News for hackers. Stuff that matters.
Re:Static site hosting hurdles by chubot on Monday September 05, 2022 @08:20PM (#32731048)
Uh what's wrong with shared hosting? I use Dreamhost but there are dozens of others. It costs less than $10/month and I've used it since 2009.

I think the industry (or part of a generation of programmers) somehow collectively forgot that it exists. I don't see any mention of it in the article -- it solves the problem exactly. It easily serves and survives all the spikes from Hacker News that my site gets.

Shared hosting is a Linux box with a web server that someone ELSE manages. You get an SSH login, and you can use git and rsync.

It's associated with PHP hosting, but it is perfect for static sites.

http://www.oilshell.org/blog/2021/12/backlog-assess.html#app...

Answer to the HN question: What's the fastest way to get a page on the web?

https://news.ycombinator.com/item?id=29254006

FWIW I also have a Linux VPS with nginx and a HTTPS certificate, but it's a pain. I much prefer using shared hosting for things I want to be reliable.

Re:Static site hosting hurdles by laundermaf on Monday September 05, 2022 @10:25PM (#32731982)
> what's wrong with shared hosting?

You answered that yourself:

> It costs less than $10/month

That’s a lot of dollars for a static website. There are a myriad of free options and there have been for years. Kinda disappointing that they weren’t mentioned. Anyone wanting to deploy a static website knows the big 4, completely free: Netlify, Vercel, CloudFlare Pages, GitHub Pages.

Re:Static site hosting hurdles by chubot on Monday September 05, 2022 @10:44PM (#32732123)
I prefer not to use free services because they're not sustainable, and they usually come with strings attached

Remember I've been using this for 13 years, and if it keeps on working the same way, I'll use it for another 13 easily. (I've hosted multiple sites on it over the years)

The current page claims it's $3.95 a month if you pay yearly: https://www.dreamhost.com/hosting/shared/

I thought mine was more like $8 but I honestly don't remember. It's a fair price for steady service IMO

Re:Static site hosting hurdles by AnonC on Tuesday September 06, 2022 @12:36AM (#32732887)
> I prefer not to use free services because they're not sustainable, and they usually come with strings attached

When I checked Dreamhost several years ago, I found that it was also an oversold service that relied on most customers using way less than the promised capacity. This doesn’t mean that it’s bad at hosting websites, but it’s not something I wanted to pay for.

So I hosted my websites with Nearly Free Speech (NFSN), where hosting is actually by what you consume. For small static sites, you could get a lot more mileage with NFSN and still not pay more than a couple of dollars a month. It’s a lot cheaper than your Dreamhost plan, and is truly sustainable because NFSN gets very close to recovering its costs plus a little more to sustain, grow and become better. NFSN also doesn’t have tricks like referral programs and other special discounts, unlike Dreamhost (talking from what I’ve seen about Dreamhost in the past).

The major downside is it doesn’t have cPanel and fancy application installers. But that shouldn’t be an issue for people who would use scp to setup web pages on a host.

Re:Static site hosting hurdles by chubot on Tuesday September 06, 2022 @12:46AM (#32732954)
Sure, NearlyFreeSpeech is probably closer to the ideal I'm talking about, but I happen to use Dreamhost.

My point was that shared hosting exists, is good, and is the right solution to this problem. My point was not that you should use Dreamhost :)

I tried NearlyFreeSpeech a few years ago; some sibling comments describe my experiences

Re:Static site hosting hurdles by bachmeier on Monday September 05, 2022 @11:22PM (#32732419)
> I prefer not to use free services because they're not sustainable

Just a guess from outside, but Microsoft is likely to be sustainable even if you use GitHub Pages to serve your static site on a free account.

Re:Static site hosting hurdles by chubot on Tuesday September 06, 2022 @12:03AM (#32732686)
When I say "sustainable", I don't just mean that the company might not have enough money to keep its lights on

It's more that some product manager or VP will notice this free service and want to attach their strings to it.

Having worked in big tech, it happens very often. Google Groups is a famous example at Google (among many). It was way better 15 years ago, but it just wasn't "worth it" to keep the lights on in its current state, so it shuffled through a series of product managers/teams who wanted to "improve" it.

Microsoft has a long history of this as well. I feel like this is another generational thing -- people forgot what Microsoft used to be like, and how their free products turned hostile. So far Github is OK, but I'm sure glad there are alternatives.

I prefer to just pay money to a company that provides a service, and I hope they profit from that. That incentives should be aligned. So far with Dreamhost that has worked out exactly as expected.

If I had spent any time migrating to the latest and greatest thing in the last 13 years, that would have easily burned the money I have saved by using a free service.

e.g. I have hosted sites on other platforms that are now down and useless, as I'm sure many others here have.

Re:Static site hosting hurdles by nsteel on Tuesday September 06, 2022 @05:50AM (#32734933)
I don't disagree with you but you can't use Google to support your argument. They have to be the worst player out there when it comes to supporting free services over the long-term. You're so much safer with Github's free tier, there's no comparison.
Re:Static site hosting hurdles by xigoi on Tuesday September 06, 2022 @06:40AM (#32735255)
If you use your own domain, you can easily change your hosting should it go down.
Re:Static site hosting hurdles by fuglede_ on Tuesday September 06, 2022 @03:26AM (#32734048)
This had me wondering when GitHub Pages was actually introduced; earliest sign I can find is a blog post [0] from December 2008, so that's almost 14 years ago.

[0] https://github.blog/2008-12-18-github-pages/

Re:Static site hosting hurdles by laundermaf on Wednesday September 07, 2022 @12:38PM (#32752898)
It’s static hosting. If they change their terms, it couldn’t be any easier to switch. I switched most of my Netlify sites to CloudFlare Pages in like 10 clicks each. The whole point of having a static file is that they’re super easy to manage.

Worst case scenario you pay a few cents to host on S3 and stick any free-range CDN on it.

I categorically refuse to use any non-static hosting for static content. Your shared hosting runs code and can be compromised, especially if you host multiple software/sites on it.

Re:Static site hosting hurdles by l72 on Tuesday September 06, 2022 @08:43AM (#32736333)
Sure, that is a lot for hosting a single static site. But, that $10 essentially gives you unlimited sites, unlimited email hosting, SSL cert management, lots of storage, unlimited network, and much more…
Re:Static site hosting hurdles by miragecraft on Friday September 09, 2022 @06:49PM (#32785826)
It's never unlimited, the terms and conditions for shared hosting are specifically designed to prohibit use cases (ex. file storage not connected with a website) that generate excessive usage.

And if you somehow find a loophole you'll quickly become persona non grata.

As the saying goes, TANSTAAFL.

Re:Static site hosting hurdles by prmoustache on Tuesday September 06, 2022 @08:04AM (#32735943)
There are web hosting plans at less than 3$/month.

There are also community hosting networks offering different kind of hosting services for a small sum / year. Here is an example of such a network mostly france based but I am sure there are same kind of initiatives all over the world: https://www.chatons.org

Re:Static site hosting hurdles by aesyondu on Monday September 05, 2022 @11:18PM (#32732378)
Shoutout to Gitlab as well, which is what I use for personal sites.
Re:Static site hosting hurdles by notpushkin on Tuesday September 06, 2022 @07:17AM (#32735520)
There are still some limits to these (for example Netlify limits the bandwidth you can use each month), but yeah, for most practical purposes the free tier should do just fine.

On a side note, I'm wondering if one can host one site simultaneously on e. g. Netlify and Vercel and load-balance those (for example, with round-robin DNS) to stay within free limits for longer.

Re:Static site hosting hurdles by ciprian_craciun on Tuesday September 06, 2022 @10:36AM (#32737667)
You could also just throw a CDN in front of Netlify (I do this with Cloudflare) and it will be extremely hard to reach that limit.
Re:Static site hosting hurdles by tannhaeuser on Tuesday September 06, 2022 @01:02AM (#32733071)
Your domain alone is going to cost about half that, and much more for fancy domains. Depending on whether you need a site mail contact (sometimes required for [email protected]) and certificate (for any ecommerce site), we're talking about at least twice that. We do talk about serious hosting, do we?
Re:Static site hosting hurdles by watermelon0 on Tuesday September 06, 2022 @02:06AM (#32733492)
Your costs are way off.

.com is around ~10$/year, email server is included in practically all shared hosting, and basically every shared hosting offers free TLS via Let's Encrypt (or some other provider.)

Re:Static site hosting hurdles by rsolva on Tuesday September 06, 2022 @02:50AM (#32733796)
Ten dollars sounds a bit expensive for shared hosting? I have been happy with Hawkhost for the last 10 years, which starts their shared hosting options at $2.99/month. That is 10 GB storage, unlimited bandwidth, host as many domains as you want, SSH access, choose between servers in EU or America. I even use it for some email addresses.

I have great respect for the folks keeping this stable and working for decades for such a low price!

Re:Static site hosting hurdles by nine_k on Monday September 05, 2022 @10:08PM (#32731863)
Nothing's wrong, it just gives much more than needed to serve a static site!

I like the idea to statically pre-generate entire HTTP responses, with all headers, and just serve a byte stream mindlessly once a URL is mapped. If TLS is handled by a separate proxy (that only does TLS termination), the "web server" becomes as trivial as it gets. Fast, simple, due to the simplicity probably bulletproof.

Re:Static site hosting hurdles by chubot on Monday September 05, 2022 @10:47PM (#32732148)
I don't really follow what you're saying

It serves static sites. I upload my files with rsync, scp, or git, and they are served

Re:Static site hosting hurdles by Groxx on Tuesday September 06, 2022 @12:11AM (#32732739)
There's still a "web server" in front of those files that speaks HTTP and delivers those files. An extremely simple one, but it still exists.

What they're proposing is cutting out the "speaks HTTP" part in favor of entirely pre-recorded responses. Whether you think that's feasible or not depends on where you draw the line in the sand, but it can certainly be easier to implement than nginx.

Re:Static site hosting hurdles by bathtub365 on Tuesday September 06, 2022 @12:33AM (#32732872)
Web servers exist already. Does what you’re describing exist?
Re:Static site hosting hurdles by ciprian_craciun on Tuesday September 06, 2022 @02:45AM (#32733759)
[the author here] Well, the article does point in the last section "Putting it in practice" to my own implementation <https://github.com/volution/kawipiko>. :)
Re:Static site hosting hurdles by forgotmypw17 on Monday September 05, 2022 @08:49PM (#32731272)
Another DreamHost fan here. I host dozens of hybrid sites on both the shared hosting and VPS and the service is great. My setup is pretty simple, a Perl-based SSG which generates static HTML on-demand if it happens to be missing from the tree.

I've had a few minor issues over the years, often self-inflicted, and whenever I use the support panel, I get a helpful human response within an couple of hours, usually with a resolution. If I have to respond, I can respond to the email by email!

All in all, can't praise DreamHost enough.

Re:Static site hosting hurdles by pryelluw on Monday September 05, 2022 @08:56PM (#32731328)
Same here except with opalstack.com It’s run by the same great team that was behind webfaction before godaddy bought it.
Re:Static site hosting hurdles by alberth on Monday September 05, 2022 @10:12PM (#32731889)
Complete agree. Been DH customer since 2004.

Just wish they used newer hardware than they do on their VPS & Dedicated offering.

Re:Static site hosting hurdles by forgotmypw17 on Tuesday September 06, 2022 @08:48AM (#32736378)
I have no idea what kind of hardware they use for VPS, but whatever thing I'm doing, they've handled it well. Haven't tried Dedicated yet.
Re:Static site hosting hurdles by bzxcvbn on Tuesday September 06, 2022 @09:10AM (#32736626)
What you're describing is a caching system, not a static site generation system.
Re:Static site hosting hurdles by forgotmypw17 on Tuesday September 06, 2022 @10:28AM (#32737562)
It's both, and can run in several different modes.

In dynamic mode, you are correct that the HTML files act as a cache.

In static mode, the on-demand layer (and any related hooks in the web server) are turned off, with all the pages being pre-generated.

There is also a hybrid mode, where the access log (and content store) is scraped for updates and they're integrated into the static HTML on a schedule.

Each of these has its own advantages and drawbacks in terms of security, accessibility, performance, and convenience.

Re:Static site hosting hurdles by giantrobot on Monday September 05, 2022 @08:37PM (#32731178)
I've also been a Dreamhost customer for a long time. Note that Dreamhost's $10/mo is for I-don't-know-exactly number of domains. If you own a domain name you can add it in their dashboard, point it to their name servers, and you're up and running. Their services includes e-mail which means avoiding the perils of fully self-hosting.

While you could save a few dollars renting a VPS, it's only cheaper if your time is worth nothing. If you're just going to do static hosting I've found it to be a good deal.

Re:Static site hosting hurdles by chubot on Monday September 05, 2022 @08:50PM (#32731277)
Yeah I think it's infinite domains ... You pay a yearly fee for each domain, which is something like $16.

But the hosting is a flat fee at less than $10/month. (edit: just checked, actually I pay yearly for a discount.)

So I find that to be pretty nice, because I have had 5 domains at one point. And now I have 3 or so.

But I always keep the same hosting account. It works well in practice.

Re:Static site hosting hurdles by giantrobot on Tuesday September 06, 2022 @04:21AM (#32734404)
You can register your domains anywhere and point them at Dreamhost. I don't recall any fees for setting up a new domain with them so long as you already own it.
Re:Static site hosting hurdles by alberth on Monday September 05, 2022 @08:24PM (#32731087)
Dreamhost is hugely underrated.

Their custom panel with deep integrations are phenomenal for side projects or small businesses. In under a minute you can have your web server, SSL cert, database and more all setup and working - and you don’t have to manage any of it.

I wish more companies offered their level of managed services.

(If anyone knows of others, I’d like to hear who)

Re:Static site hosting hurdles by dragontamer on Monday September 05, 2022 @08:31PM (#32731139)
Is there anything really wrong with a CPanel host with FTP upload?

Namecheap, Dreamhost, GoDaddy even (well maybe not them lol). There are a billion shared hosts everywhere and CPanel really isn't hard to use for HTTPS enabling or getting FTP locations to work with.

------

Bonus points: shove a random .php file in there and it probably will work if you need just a little bit of dynamic content.

Re:Static site hosting hurdles by Dalewyn on Monday September 05, 2022 @10:27PM (#32731994)
>Is there anything really wrong with a CPanel host with FTP upload?

Nothing, other than that it's not cool with the kids because it's the grandpa's way of being a webmaster.

Personally, being an old school grump, I'll choose FTP upload over Git nonsense any day of the week because why in the nine seas of the seven hells do I need to sign up for Github, upload all my crap there, download-install and run a Git daemon, feed it my Github login credentials, let the daemon download and sync/compile/whatever the code I have there, and then probably run the whole contraption through sixty dozen frameworks of JavaShit to have a website?

I'll just fire up Filezilla or whatever is the trendy FTP client nowadays, punch in my login creds, upload my crap that I wrote up in Notepad++, maybe have some fun with PHP because I'm old school, and be done with it. :V

Re:Static site hosting hurdles by wildrhythms on Tuesday September 06, 2022 @06:12AM (#32735078)
Lots of us old school grumps still running things the old fashioned way for many years, serving millions of requests without issue, customers happy, and with a deployment pipeline anyone can understand :)
Re:Static site hosting hurdles by reaperducer on Tuesday September 06, 2022 @07:46AM (#32735772)
Because were more interested in getting things done, rather than tech fad signaling.
Re:Static site hosting hurdles by pdimitar on Monday September 05, 2022 @10:34PM (#32732059)
You over-focus on what's cool or fashionable. For many of us that's absolutely not the reason to go (or not to go) with a platform.

GIT is extremely useful for versioning. I want that. If I make a dumb mistake I want to have a diff that I've fixed a typo / grammar / added more links etc.

You neither need to use GitHub nor give your GitHub credentials to anything. You can just make a public repo and have it cloned / pulled-from by literally anyone interested -- why would anyone clone your public blog repo and re-host it? You can use sr.ht, Codeberg or just host your own GIT -- it's not that hard if you're into it (I am not).

Your way of doing it is fine but let's not pretend that everyone else is following fashion or coolness. That's very rarely true. There's a list of very good reasons to use a public GIT repo + Netlify + use a static site generator on your own machine to only produce a directory of HTML+CSS files.

Re:Static site hosting hurdles by Dalewyn on Monday September 05, 2022 @10:53PM (#32732197)
Generally speaking, I subscribe to the philosophy of KISS.

For a multi-user environment where a dozen people could be accessing the same file at any given time, yeah some sort of version control system will probably make everyone's life easier.

For a single user environment as is likely the case for most static websites? Yeah, it's just needless complexity.

In fact, you lost me at "static site generator". WTF? Just write the damn HTML and CSS yourself, it's static after all.

This isn't to say your way isn't wrong /for you/, of course. Whatever floats your boat. For me, it's all just unnecessary complexity that will invite in all sorts of gremlins to waste my time.

Re:Static site hosting hurdles by dragontamer on Tuesday September 06, 2022 @12:43AM (#32732928)
> In fact, you lost me at "static site generator". WTF? Just write the damn HTML and CSS yourself, it's static after all.

At a minimum, static site generators create indexes, table-of-contents, tags, sorts by date, and other such features.

Pretty much no one writes good, raw, HTML these days. Documentation is written Sphinx, texinfo, docbook, and many other formats. Why? Because compiling chapters (or pages) together through static analysis is a very useful pattern for writing.

HTML is just an output pattern. Your actual words should be in a document generator at a minimum.

Re:Static site hosting hurdles by notpushkin on Tuesday September 06, 2022 @07:24AM (#32735572)
My website [1] is good raw (X)HTML [2]. It's just a couple of pages though, nothing fancy. If I was keeping a blog or something, I would definitely go for an SSG.

[1]: https://notpushk.in/

[2]: https://gitlab.com/notpushkin/notpushk.in

Re:Static site hosting hurdles by pdimitar on Wednesday September 07, 2022 @08:00AM (#32749464)
> It's just a couple of pages though, nothing fancy

Nope. Anything I can have a machine generate for me is fancy if I have to write it by hand.

Re:Static site hosting hurdles by pdimitar on Monday September 05, 2022 @10:59PM (#32732239)
> For a single user environment as is likely the case for most static websites? Yeah, it's just needless complexity.

Hard disagree. As I said above and you ignored it (no clue why): I want to have a history of my static website.

> In fact, you lost me at "static site generator". WTF? Just write the damn HTML and CSS yourself, it's static after all.

I can and I don't want to. Markdown is tons easier, you write out an article, execute one command, push the updated HTML+CSS files to GIT and you're done. If we're talking about simplicity let's not ignore that scenario because it really is quite simple.

I got a backlog of 30 things to work on and 500+ to check out "one day when I have the time". Going back to hand-crafting HTML is likely at spot #1784 in my brain. It's a meaningless paperwork that can and must be outsourced to computers.

Re:Static site hosting hurdles by reaperducer on Tuesday September 06, 2022 @07:52AM (#32735846)
Git for static site versioning? Why not just copy the HTML into a new folder? Takes seconds. Zero complexity. Gets backed up with your regular system backups.

Git is great for collaborative or complex projects, but for a static site, you're using a freight train to bring a single tomato to market.

Re:Static site hosting hurdles by pdimitar on Tuesday September 06, 2022 @08:11AM (#32736017)
Well, even though I can reinvent `git diff` I still don't want to. GIT gives me good diffs and I don't view it as an unnecessary overhead.

¯\_(ツ)_/¯

Re:Static site hosting hurdles by monsieurbanana on Tuesday September 06, 2022 @09:36AM (#32736918)
I'm fairly certain that was a joke
Re:Static site hosting hurdles by alberth on Monday September 05, 2022 @08:35PM (#32731165)
There’s a massive difference in quality and ease of use between cPanel and dreamhost custom panel.

I’ve been a customer since 2004

Re:Static site hosting hurdles by dragontamer on Monday September 05, 2022 @08:43PM (#32731225)
Well, I'm sure that's true.

But I guess my overall point is that CPanel is way easier than anything the original poster / author wrote.

Re:Static site hosting hurdles by js4ever on Tuesday September 06, 2022 @01:47AM (#32733346)
Please check https://elest.io You can deploy WordPress, Ghost, Magento and 185 fully managed software. You get a dedicated VM with stellar performances, SSL, smtp, security, borg ans S3 backups, monitoring, logs and full root access even if it's managed. We also support CI/CD pipelines.

Disclaimer: I work there ;)

Re:Static site hosting hurdles by trinovantes on Monday September 05, 2022 @09:33PM (#32731593)
I think this is what Cloudflare Pages tries to solve

You just connect your git repo and tell it what command to run to build your site and where the html output is

Re:Static site hosting hurdles by alberth on Monday September 05, 2022 @09:45PM (#32731686)
I really love Pages but for simple apps that are just PHP and MySQL - Pages doesn’t support that.
Re:Static site hosting hurdles by Syeposxr on Monday September 05, 2022 @10:12PM (#32731894)
Well in that case it's not a static site any more.
Re:Static site hosting hurdles by chubot on Monday September 05, 2022 @08:40PM (#32731207)
FWIW I also tried NearlyFreeSpeech, which is the top comment in the same thread I linked:

https://news.ycombinator.com/item?id=29253277

I think it is good, and will solve people's static hosting problem. It's a server that you don't have to manage. It has a nice fast custom web interface.

Except I didn't realize it was FreeBSD. That probably doesn't matter for most, but I'm used to Linux, so I like Dreamhost better. Also I feel like they are using some kind of slower NFS disk, whereas Dreamhost feels like a bare metal disk mostly.

-----

I was trying to find another thread here, where someone remarked that "shared hosting" got a bad reputation in the early days due to janky control panels and bad/aggressive marketing.

Also a lot of the companies seem to have gotten acquired in the early 2000's, i.e. they changed hands a lot.

But again I've been using Dreamhost since 2009 and it's been great. No complaints except the typical thing everyone does of raising the domain name pricing after a year (the advertised price is the "first year discount").

They have not raised the hosting fees. (You might save $3 per year using a domain name purchased elsewhere, but that doesn't seem worth the hassle to me.)

So I thought there were many other shared hosting companies, but maybe not? Maybe they all got caught up in acquisitions and then the service declined? (That's exactly what's going to happen with the free cloud services you're all using now BTW, so that's why I stick with something older and proven.)

I have used 1and1 in the early 2000's, but I remember it being very janky and weird, and Dreamhost is a lot better technically. They seem to have more competent system administration.

----

FWIW here is a thread with some competitors:

https://lobste.rs/s/jkutwc/recommendations_for_shared_hostin...

Honestly I wonder if Dreamhost is more unique now than it used to be? I thought of it as "commodity shared hosting" -- i.e. a Linux OS and a web server. But I think that actually being able to manage that competently is a dying art :-/

Other threads I bookmarked while looking for shared hosting that supports FastCGI (dynamic sites, not static, and not PHP!):

bluehost: https://www.bluehost.com/help/article/fastcgi-for-php

hostgator: https://www.hostgator.com/help/article/does-hostgator-suppor...

I'd be interested to know if those companies are comparable to dreamhost!

Re:Static site hosting hurdles by kej on Monday September 05, 2022 @09:46PM (#32731689)
As a long time (but very light) Nearly Free Speech user who is also more used to Linux, I'm curious if you ran into specific problems because of them using FreeBSD, or if it was just the general feeling of things being slightly different than you're used to (which is totally a valid reason to prefer something else, I'm just wondering if it was more than that)?
Re:Static site hosting hurdles by chubot on Tuesday September 06, 2022 @12:10AM (#32732732)
I think a lot of it was the network file system issue I mentioned -- the shell felt slow, and I suspect it was because of a network disk. I can't be sure, but I think that is a significant difference between Dreamhost and NearlyFreeSpeech.

Also at that point I had used Dreamhost for ~10 years, so I was just more comfortable with it. I like how my files are in ~/oilshell.org and my logs are in ~/logs/oilshell.org. If I had started with NearlyFreeSpeech I'm sure it would have been fine

IIRC the reason I tried it was because I was looking for FastCGI support (i.e. non-PHP dynamic sites that you don't have to maintain a daemon for)

I don't quite remember, but I think they did have some FastCGI support, but it wasn't quite what I wanted, or maybe the Python version was different, etc. It looks like a great service, but I don't currently use it

Re:Static site hosting hurdles by stevenally on Monday September 05, 2022 @09:08PM (#32731415)
Yep. Been on Dreamhost since 2004. Just create the html file and sftp it using FileZilla. Setting up a domain is just a few clicks on their admin site. PHP + MySQL works perfectly. All for $10/month.
Re:Static site hosting hurdles by adriangrigore on Tuesday September 06, 2022 @10:08PM (#32745591)
Shell is what I use to generate my sites also https://mkws.sh! Very simple, very eficient!
Re:Static site hosting hurdles by ciprian_craciun on Tuesday September 06, 2022 @02:54AM (#32733825)
[the author here] Indeed didn't mention anything about the shared webhosting solutions, just as I didn't mention anything about S3 + CloudFront, or Backblaze B2 + a CDN in front, or Cloudflare + WebWorkers, or AWS Lambda, or any other thousand ways to do it... (Like for example there is <https://redbean.dev/> which I find just so intriguing, and not far from my own <https://github.com/volution/kawipiko> proposal.)

Although shared webhosting is part of our web history -- and still a viable choice especially if you have something in PHP or something that requires a little-bit of dynamic content -- I don't think it's still a common choice for today.

It's somewhere in between dedicated cloud-hosting, because although you have an actual HTTP server (usually Apache or Nginx) that you can't configure it much because it's managed by the provider, thus it gives you the same features (and limitations) as an a proper cloud-hosted static site solution (such as Netlify); and between self-hosting because of the same reasons, having an actual full-blown HTTP server, but one you can't fully control, thus it gives you fewer features than a self-managed VM in a cloud provider or self-hosted machine. Thus unless you need PHP, or `htaccess`, I think the other two alternatives make a better choice.

The issue with "static sites", due to the de-facto requirements in 2022 imposed by the the internet "gatekeepers" (mainly search engines), is that they aren't "just a bunch of files on disk that we can just serve with proper `Content-Type`, `Last-Modified` or `ETag`, and perhaps compressed"; we now need (in order to meet the latest hoops the gatekeepers want us to jump through) to also do a bunch of things that aren't quite possible (or certainly not easily) with current web servers. For example:

* minification (which I've cited in my article) -- besides compression, one should also employ HTML / CSS / JS and other asset minification; none of the classical web servers support this; there is something like <https://www.modpagespeed.com/>, but it's far from straightforward to deploy (let alone on a shared web-host;)

* when it comes to headers (be it the ones for CSP and other security related ones) or even `Link` headers for preloading, these aren't easy to configure, especially if you need those `Link` headers only for some HTML pages and not all resources; in this regard I don't know how many shared webhosts actually allow you to tinker with these;

The point I was trying to make is that if you want to deploy a professional (as in performant) static web site, just throwing some files in a folder and pointing Apache or Nginx at them isn't enough. If the performance you are getting by default from such a setup is enough for you, then perfect! If not there is a lot of pain getting everything to work properly.

Re:Static site hosting hurdles by martin_a on Tuesday September 06, 2022 @06:39AM (#32735253)
This is wrong on many levels.

Most people don't need all that complexity and configuration options, especially if you just want it to work.

Asset minification can be done locally, besides the ominous gatekeepers don't give a fuck. I've got a static website with lots of files, just HTML and CSS, not even minified I think, and a dozen lines of JS, and it's a solid 100/100 on Page Speed Insights.

Link headers? There's a HTML tag for that and it's fast enough: https://developer.mozilla.org/en-US/docs/Web/HTML/Link_types...

You're just bloating everything up.

Re:Static site hosting hurdles by chubot on Tuesday September 06, 2022 @10:47AM (#32737788)
The point I was trying to make is that if you want to deploy a professional (as in performant) static web site, just throwing some files in a folder and pointing Apache or Nginx at them isn't enough

Shared hosting is basically where somebody configures and runs Apache or Nginx for you ... they know how to do this, and it definitely works!

Re:Static site hosting hurdles by marc_io on Tuesday September 06, 2022 @11:11AM (#32738154)
> I don't think it's still a common choice for today.

Not true at all. About 37% of the web hosting market is shared hosting. Just do a simple web search for the size of the web hosting services market to find this information. It's one of the 3 most common choices today – and it's always been that way.