Tuesday, March 31, 2026

Static Website Hosting

"How do you get away with not paying for web hosting?"

This is something I've been asked when going over website design and deployment options with clients.

It's a reasonable question, and certainly in a world where everything in tech seems to be pay-forever by default, it really does seem like I must be "getting away" with something.

A high-level answer is to consider how many online services you already use - email, calendar, blogs, social media - which all have paid tiers, but which also provide at least some useful base functionality for free.  If you can take free feature A from over here and free feature B from over there, you can build a collection of useful services without having to pay forever for each of them.  Naturally, there will be limitations!  But, if you understand those limits, you still have plenty to work with. 

So, to begin with, what is static hosting and why is it even useful for a modern website?

"Static hosting" just means that when your web browser requests a site from the server, it gets the same data back, regardless of who is asking or when.  There's nothing to "log in" to, there's no "shopping cart", there's no personalized feed or comment section.  You load the page, you get that same, unchanged page.

...Asterisk.

See, modern web browsers are capable of handling really complicated sites.  Sites that make use of tools and trackers and services from all over the web, not just the initial page that loads.  If the browser is given the right instructions, it can load data from one site inside another.  There are different ways to achieve this.  One common thing you've seen many times is an embedded YouTube video or social media post.  A rectangular chunk of the website you're on is cut out, and pulled in from elsewhere.  It's often a little ugly, but very easy to do.  More elegant and subtle implementations exist, too.  This blog post is hosted on blogger, at "oswerk.blogspot.com".  But, that same data can be pulled in and styled according to my own website, "oswerk.net", and displayed there, as long as the code being served from "oswerk.net" understands how to make that happen.

And it does, because I'm a geek and I write websites for fun.  :^)

Static Hosting versus Dynamic Hosting

In the image above, your laptop loads two similar websites.  One is from a simple static server plus some linked services, the other is from a beefier dynamic server which handles everything itself.  (In reality, dynamic servers often use external resources too, but you get the idea.  On the left, the servers are all simple enough to be freebies.  On the right, some extra oomph is needed on the backend.) 

So, if we're clever, we can design a modern-looking, sleek and "dynamic"-appearing website, which in truth is being served up by the most simple of webservers, leveraging the browser itself to pull in dynamic content from other platforms.  Platforms like your free-tier Blogger or YouTube or Google Calendar accounts.

Then, who actually hosts these static sites? 

The biggest go-to hosts for this kind of thing are GitLab and GitHub.  These are services intended for programmers to collaborate on software projects.  Both of these services (and many similar ones) offer extensive documentation about how to set up a website using their servers, and have free-tier accounts for developers which allow static hosting.  You don't have to be a programmer to sign up - anybody can own a software project.  That software project can be hosted for free if it's public, and you're in luck - a website is exactly a public piece of software!

There are plenty of smaller alternatives to GitLab and GitHub, including nonprofits, services hosted in Europe - this is a space with a lot of niches, a lot of paths forward, and a lot of free hosting options.

So, what's the catch?

I don't deal in catches!  I understand tradeoffs.  Everything in computing and in life is a tradeoff.  And the key truth here is that not every website can be hosted for free.  Anything with a database which users can search, or account management, or online ordering, or even a simple form-to-email relay, will require some dynamic services on the backend, and could rule out static hosting as a viable option.

- User-submitted material like forums or comments?  Not on a static site.
- Anticipating millions of hits?  You'll want a dedicated server, maybe many.

I've got some neat tricks to integrate your business's public calendar or your blog posts, things to keep your site fresh and interesting, but the fact is that static hosting is not a suitable choice for everybody.  Many local and small businesses truly can "get away with" free static hosting for their websites, and others will need something different.

I am happy to design and implement whatever fits you best, be it a website or any other kind of software.  But by default, I will help you avoid as many pay-forever services as possible.

No comments:

Post a Comment