Github pages is fine, but the extra gh-pages branch is kind of annoying. It's fairly clear (for obvious reasons) that they mainly think about Jekyll users, though I had a Hugo blog there for a while.
Netlify sounds great, but in practice I ran into an annoying issue that I couldn't resolve where I had to rerun every automatic build. This probably isn't really their fault but the forums didn't work.
Cloudflare Pages kind of just worked out of the box, and since I was already using it for my DNS, changing where the domain pointed took a few seconds.
I'd suspect, if you corrected for how many issues were particular to me, I'd say Cloudflare Pages ~ Netlify > Github Pages. I'm kind of surprised the latter charges you for custom domains; I do have to say there's more documentation for Github than any of the others.
GitHub Pages is static hosting. If you don’t need Jekyll, don’t use it. There’s nothing special about it.
GitHub Pages does NOT charge for custom domains.
You can configure any branch for GitHub Pages, or even just the /docs folder on the main branch.
This is in the docs: "GitHub Pages will use Jekyll to build your site by default. If you want to use a static site generator other than Jekyll, disable the Jekyll build process by creating an empty file called .nojekyll in the root of your publishing source, then follow your static site generator's instructions to build your site locally." (https://docs.github.com/en/github/working-with-github-pages/...). Netlify and CF will both run some other static site generators (e.g. Hugo in my case) for you, while Github Pages will run Jekyll (or you can build locally).
And yes, custom domains are free for public repos. I made a mistake reading the page about custom domains, which mentioned that private repos need a Github Pro account. You're also right about configuring any branch.
The default setup for GH Pages is not great. Jekyll is very dated. But if you use GH Actions, you can build yourself a pretty great setup. My site is open source at https://github.com/jacobp100/jacob-does-code - there's also a blog post about how the build system works.
As someone who does a lot of browsing with unpopular web browsers, Cloudflare is basically a way to ensure that it is a coin toss as to whether or not I will see your site; it is not the worst CDN/DoS protection racket service out there though. I would like to see how much legitimate traffic Cloudflare or the others block, and how much website operators are spending on that "service."
Third party free hosting excels at the ability to do a start to finish page in inside an hour. I want to spend 55 minutes of that hour writing the text, not fiddling with oddities of how to make GitHub actions show me the parse errors of my markdown...
That is not the case with netlify.com which boasts a myriad of features, is equally as fast, production-ready, and competitively priced.
With pages.dev, I believe, you pay per every domain you host, whilst with netlify.com, there's no cap on number of domains per account, though they do charge for bandwidth (unlike pages.dev).
Workers Sites [1] is a viable alternative and I quite prefer it over pages.dev.
[0] https://developers.cloudflare.com/pages/platform/limits
[1] https://developers.cloudflare.com/workers/platform/sites
What do you mean by that? I've been (and still am) hosting quite a few pages with their service using custom domains and have never been charged for that.
Saying that because I tried it out again a few weeks ago for a friend's website (https://neasair.org), and nope... it doesn't provide AAAA DNS records (IPv6), just A (IPv4).
So, had to put the website on some other infrastructure already hanging around, that does do AAAA records.
Gitlab pages has an option to look at the /build folder for web pages to serve up. So as long as that folder is in the .gitignore, my Gitlab ci just runs `hugo` to build the site which then gets served up.
You can configure github projects to source from a different branch (including your main/master branch if you check in build artifacts directly)
Granted, my blog is an insignifcant site with a tiny readership and I rarely update it, so if you need something more heavy duty than I have no idea if GH pages is up to the task.
You don't need that anymore. You can run Github Pages out of a branch like /docs, which makes life much simpler. That's how I run most of my sites.
- I've got several sites on gh-pages with custom domains and pay exactly $0
- I don't use Jekyll, I literally just `git push` a static repo
We nerds often seem to fall into the trap of over-engineering things, like, spending a lot of time building personal stuff that can scale into the infinity – only to end up never having more than 10 concurrent visitors at any given time.
By accepting and embracing the intermittent and slightly unstable nature of serving websites from our homes, we can take back much of the in(ter)dependence and hacky, quirky fun that many of us fondly remember from the 90's and 2000's.
Setting up a webserver on a Pi and serving it from home can be a fun project, not necessarily trivial for everyone, but definitely within reach for most technically inclined people.
Might be among the cheapest, easiest AND fun ways to host a static site :)
Bonus that this works even if your server is behind some DMZ or bastion without having to open up the mothership.
(For the use-case of a public personal static site this probably doesn't make much sense; you could just publish to the VPS in the first place. But if you have server-side stuff you must or want to run locally for whatever reason, this is way more straightforward to get right than manually fiddling with iptables, using some SSH tunnel, or setting up redundant reverse proxies)
Put the free Cloudflare proxy in front just to speed it up a little.
Do you take precautions or just accept the theoretically lower reliability of the phone – which isn't anything reliable anymore anyway, thanks to VoIP?
Me and a friend mentor for Code Louisville, and we're able to get the beginner frontend students up and running very quickly using these options - they're free and much easier to use.
"GitHub Pages is not intended for or allowed to be used as a free web hosting service to run your online business, e-commerce site, or any other website that is primarily directed at either facilitating commercial transactions or providing commercial software as a service (SaaS)."
So it's great if you want to host a personal site / blog or some other non-revenue-generating website, but for anything more than that you could run into issues.
[0] https://docs.github.com/en/github/working-with-github-pages/...
Damn, I have never been so wrong:
- the interface is so intuitive I never opened the documentation
- this is FAST (the bottleneck to see my website live is now my browser cache)
- no need to create a Github Actions pipeline to deploy, just say "hey, my repo is here"
- automatically integrated with Let's Encrypt for custom domains
- deploy previews!!!
And so much more.One of their neat features is the ability to spin up "pull request sites" automatically, so you can share versions of your site with stakeholders before it's made live.
Disclaimer: I work at Vercel, happy to answer any questions.
[1]: http://vercel.com/
Disclaimer: I don't work at Vercel and I'm just a regular guy
[1] - https://neocities.org/
Example site: https://jeremyshaw.co.nz
Other than that I'm sure Github Pages and Netlify are fine, both very popular options.
Worst case you put it on Amazon S3 and get charged a fraction of a dollar every month .
The fact that you cannot put a cap on your spending is infuriating (the official AWS answer is "we do not want to break your business" (even if I want to)).
To be fair, some complaining or crying in such cases usually gets your bill reversed.
I miss the old days :(
I host my personal site this way.
I also host about 100 mostly-static mostly-low-use websites at work similarly: with Apache on a couple of VMs. They are more reliable than the free versions of Netlify etc, and the systems work to maintain 100 static websites is little different to maintaining 5 static websites.
It will also be stupid fast (cloudfront is edge networks) + have ssl + it will not go down if you ever see a surge in traffic.
I have several of these and they work beautifully. As far as cost goes: 12$/domain per year + 0.5$/month for route53 zone + 0.2$/month for the actual traffic and hosting the content in S3. So it's under 2$/month for "enterprise grade"
Except that it isn't.
Only the domain, and to some extend, the S3 costs are the "fixed" cost that you can even predict at first. A surge in traffic will surely increase the egress data, and that is easily $0.05-0.10 per GB.
Cloudfront is one of the most expensive CDNs out there, and after 2-3 years of use, I came to realize how much I was wasting money on. CDNs often work quite flawlessly if you have a good cache busting mechanism, and I was paying a huge premium for what was essentially a set-once operation.
https://azure.microsoft.com/en-gb/services/app-service/stati...
Would recommend giving it a bash, or you could deploy it manually with Azure Blob Storage Websites and a simple deployment CI pipeline.
With free private repos and that kind of integration it's a pretty neat setup.
[1] = https://surge.sh/
I have switched to BunnyCDN [1] a while back, also very happy with it. Pricing is extremely cheap, and has the added benefit of being able to cache anything dynamic you might add in the future.
[1]: https://bunny.net/
Here’s my setup with Zola: https://seanharrison.org/postgrails/20200523-got-zola/
A couple notes about setting up DNS since the gitlab instructions weren’t 100% clear to me: https://seanharrison.org/postgrails/20200720-gitlab-pages-dn...
I mean, if there's a chance, however remote, that you might end up as the #1 of reddit or whatever, stay away from S3. Your site won't go down, but oh god, you pay for that.
If AWS + CloudFront is too difficult and you don't mind spending a few bucks, it's pretty easy to get started with LightSail - about $3.50 a month.
You don't even need to create an account, just upload a zip of your files.
Don't get me wrong: I enjoy complex services as well. But for simple web hosting, NearlyFreeSpeech is the best I've found, and whatever is second isn't close.
Though for production I'd probably use S3+Cloudfront.
Basic FTP hosting starts from $10 per YEAR so it can be considered cheap as well - just create an subaccount that after login will be in the your page destination so it will be blazing fast to use with w.g. FTPzilla and just drag and drop your files each time you want to update.
Disclaimer: I'm a co-founder
How did it go?
Are you referring to specifying the path to your static folder/directory in your app.yaml file? If so, that doesn't seem so difficult to me.
Yes, you're right - the deployment is a single command for something as simple as a static website until the next time you need to make changes (then you'll have to root around your terminal again) or you decide to upgrade from static to something a bit more complex. Shameless plug here - my site, https://nocommandline.com, allows you to just select and click deploy; no routing around in terminal/commandline.
These days, though, I just use netlify. It's not quite one command, but it's about heroku-level easy, and it gives you a lot of little niceties (autodeploy whenever you push a specific git branch to github, ssl, etc).
git push
and that deploys my static site, which I think counts as "Heroku but even easier".For this to work, in the bare repo I push to, over ssh, the post-update hook automatically pulls into a non-bare repo:
#!/bin/sh
set -e
echo -n 'updating... '
git update-server-info
echo 'done. going to foo'
cd /home/bar/public_html/absolute/path/of/a/non/bare/clone
echo -n 'pulling... '
env -u GIT_DIR git pull
echo -n 'updating... '
env -u GIT_DIR git update-server-info
echo 'done.'
You can use rsync too, but I think Git is substantially better for this kind of thing.Now of course this assumes that you already have a server machine somewhere, which you can ssh into, which is running a web server, and which is already in DNS. I've been in that situation for 26 years now, except that at first I used telnet. So I kind of take it for granted.
It sounds like maybe you're looking for a way to not run your own web server process, instead sharing the burden with other people, like a PHP shared host from 15 years ago. If that's what you want, maybe you should share the server with a few friends? Like, two to eight? That way you don't have to give up the ability to solve whatever problems come up with the server.
https://www.digitalocean.com/products/app-platform/
"..Build and deploy 3 static sites for free."
You specify a build command (ex. `npm run build`), and a directory (ex. `_site/`) and it will build and host it for you. It can automatically deploy on git events, or via web hook, or manually (button push). SSL/custom domains are also free and very easy to setup.
I stan render.
I actually started it using myself, because it is so nice to just zip a folder and get it online in ~10 seconds.
- Go to repl.new/html
- Write code
- Hit run, deployed!
- (optional) link domain
If you want a more CI type service (i.e. you push your code and it builds on the cloud, rather than you build it locally - or it requires no build), I’ve found Netlify pretty good.
Was using Vercel for a Next.js project recently, quite nice experience but it randomly started timing out about 50% of builds and their support were unwilling to help without a minimal repro - fair enough, but I was on a deadline so switched to Netlify, which built the site with no issues.
Will try out Cloudflare Pages next based on the positive comments in here!
The benefit is that it's just a linux distro of your choice, so you can use whatever you are familiar with, and there is scope to add non-static service if needs be.
You also get a few free static sites as well https://www.digitalocean.com/products/app-platform/
- GitHub Pages and Netlify are the two obvious and most popular choices, but there's also cloudflare, gitlab pages, hell even Keybase has static website hosting: https://book.keybase.io/sites
Please don't upvote or downvote this one. It's more like a "debugging" comment.
[0] https://www.awardspace.com [1] https://firebase.google.com/docs/hosting
You can also tie it with the free plan for Cloudflare Workers if you have some need beyond static pages.
I've been using this for years at over a dozen different projects, I think it's a great way to host even commercial sites.
It's ridiculously easy. It's a front-end to Dropbox, so if you're already doing this, it's basically:
Sign up, chose "mycrapsite.site44.com"
cp -pr deployedsite/* ~/Dropbox/Apps/mycrapsite.site44.com
Now your site is on the web.
Nothing else is as easy as that. Super convenient for a lot of times when you just need a few files accessible via the web for some reason, too - no need to use any web interfaces, just copy on the command line, and done.
And someone using free plan X at home is more likely to choose Pod plan Y from the same provider for work.
Details here: https://fotijr.com/blog/2020/how-its-made/
[self-promotion] After some frustration, I actually started working on a blogging platform that combines the speed of static site generators with the comfort of hosted solutions, all while making sure you own the data in a sane format. And also a personal preference - it must be as green as possible.
Check it out: https://zeroms.blog/
I should have the MVP ready next month.
Github basically gives you a free IDE. There's no need to compile as markdown is converted to html on the client side.
However for my use case I now use cheap shared hosting and Wordpress, because the sheer amount of plugins to solve all kinds of problems is amazing.
One of the built in themes I think 2019 is a nice starter for a modern site and with Gutenberg you can create a fairly modern responsive site out of the box.
There is a plug-in for free that’ll backup the entire installation to your Google cloud and other clouds.
There are cache and SEO plugins for free to sort that side of things out.
Ive not used it but there is woo commerce for shopping although I wouldn’t blame someone for skipping it and using shopify for ease of use.
I also love not battling with Hugo etc. at the technical level. I do not miss reading Hugo docs thinking wtf!
Hosting for unlimited sites is costing me about $50 a year so pretty much zero.
Have used the cache-everything trick for client sites back in the day to serve a top 15 post on /r/all from a $5 Wordpress box.
Man, I'm so glad to be out of that space...
You can fix this issue by building the site locally and push the generated files but it feels less "proper" to me. There is also the cache policy problem (TTL of 10 minutes) but that's minor.
Why? Then you can build it locally and push it to multiple sites?
But if it's for personal use then the easiest is to simply install nginx from your repos on your home computer and put html and media files in directories. Then forward port 80 on your router to the IP of the computer. nginx serving static is not going to be a risk. It's extremely simple. And having everything on your local computer makes it easy to share and very fast to iterate.
However, there are some limitations such as if you need to add custom headers.
If you need more customization, then S3/Cloudfront also works well too. I also use Netlify and had minimal issues.
If you go with Jekyll, it's really nice to work with. I decided to go with GHP over hosting myself in case I ever get super famous, which will most likely never happen.
Ultimately, its easy enough that you can get writing right away. If you decide that the software isn't enough, it'll be a breeze to move somewhere else since its all markdown.
The downright easiest and cheapest (free) platform I find is AWS Amplify Console. It's simply too good to be true (no affiliation).
Connects with repos on all platforms (bitbucket, gitlab, GitHub). Push to deploy. Most of my sites are still on the free tier.
If you manage your DNS with Route53, you don't even have to configure subdomains anymore, every new site's domain is automatically configured with a click.
I found S3 static hosting to be fairly straightforward. Once set up, a single `aws s3 sync . s3://my-bucket/path` updates the content.
Single command deployment with rsync.
Plus you get serverless functionality for free with php scripts. Just place it in a folder and access it via browser.
Magic.
Not sure if it’s the cheapest way to do it, but it seems extremely cheap. Likewise not sure if it’s the easiest way to do it, but it seems easy now it’s set up - everything is in one place.
IIRC Cloudfront <-> S3 data transfer has quite a generous free tier.
The only thing I worry about is whether uploading objects is expensive, and invalidation. But it’s not been (noticeably) an issue so far.
If it's a commercial project I don't see the point of paying a premium for the nice UX, hosting static files is easy enough and I don't have investors' money to waste. I would spend my money on a CDN like BunnyCDN and throw a file server behind it.
- tls
- github integration (although limited to personal accounts only and NOT org -- which is nutsz but I understand the rationale)
- it also comes with cloud functions, and routing which could be very powerful
I think cloudflare pages with workers offer the same set of features PLUS team and github org integration, but so far I like what vercel is offering
Was next to free in 1999, still is.
PS: I work at OCI
Granted, it took some setup to get there, but it's pretty easy now and portable too. Can easily be switched to any other service.
I currently just sftp in to deploy, but it would be pretty easy to set up sshfs so you wouldn't even need to open a terminal if you didn't want to.
Rendering (which is custom and optimized for minimal delta updates) is done on a tiny VM that hosts other services, triggered by a GitHub hook.
Without smallprint it's either self-host on a raspi at home + some dyndns (cost near 0, larger initial effort) or EUR 2 per month for shared hosting (in germany).
It's super quick to set up, and you can have a mix of static/dynamic content on the same site.
You type HTML and click "deploy." It's free.
You can use custom domains with SSL
Here's a full example:
I just build a tiny busybox image and serve the static pages via httpd. It‘s git push to Github to deploy. Obviously not a low tech solution, but was still fun to build.
I use Hugo but they support a bunch of different types.
Digital Ocean is also just super easy to use in general.
No free or cheap , doesn’t have much controls but can’t complain a lot either
If you’re already on AWS I’d recommend giving it a shot.
Just edit your index.html locally and it's pushed when your Dropbox syncs.
£4.99 for basic account
£9.99 unlimited subsite account (my choice)
No need to run daemons or maintain packages or configure backups
You can configure ssh access to put files
To deploy I use lftp which takes ftp commands from stdin and can do a recursive mput very similar to rsync
so I run my hand built deploy.pl which calls a subscript like this
time ./scripts/push_to_cdn.pl | lftpIf you decide to move from static to something more complex, you have bunch of languages to choose from.
Only downside: it's Google.
I like Netlify for most stuff personally.
[1]: https://wasabi.com/
Doesn't get much simpler than:
ftp-upload -h myisp.net index.html
Domain costs are separate but I don't think that belong here.
Make a new blog on Blogger, switch to classic theme, edit the template, delete everything in that box and cut/paste your HTML. Images can be hosted by making a new blog entry, uploading images to it and saving it as a draft. Once you disable the Blogger top navbar, the theme as a single page website is pretty transparent and works well.
It isn't free -- it is pretty cheap -- but it has a lot going for it. It requires no custom tooling -- I upload via rsync. This makes it trivial to migrate to a new provider if necessary.
I develop my site locally, then rsync it up. I have a custom domain pointed at the site, and also a custom .htaccess, so I have a good amount of control over the site. I do things like serve html without the .html filetype in the url; e.g. https://zck.org/emacsconf2020 is stored on the server as emacsconf2020.html . (I do this so Emacs recognizes the files as html, but keeps the urls clean).
It's a nice tool if you want to get a little involved in your setup, without getting wrapped up in proprietary tooling. It does charge for what you use, so it's not a great site if you are going to host Blu-ray images that get downloaded from everyone on HN.
They recently published this blog post: https://blog.nearlyfreespeech.net/2021/01/19/free-speech-in-...
After reading this, I made the decision to move my hosting elsewhere. I have never hosted content that is even remotely political, and have no intention to do so. I had chosen to patron nearlyfreespeech based upon the belief that their conception of 'freedom of speech' matched my own. I believe 'freedom of speech' is not just a convenient vehicle for expressing my own political ideas, it is an important political idea in and of itself. I believe that the freedom for individuals to express their ideas without censorship is integral to a free and intelligent society. This post of theirs demonstrates that I had clearly misunderstood their beliefs.
It's clear that 'freedom of speech' is a controversial notion in today's society. If they market their service based upon their respect for so-called freedom of speech (it's in their name), I don't know what kind of crowd they expect to come. I came not out of a need, but based upon my political views. I imagine I'm a minority. I'm not interested in a host that markets itself in such a way, and then demonstrates that what they _really_ meant was that they want an environment where you're free to agree with their views.
The pay as you go model they use can mislead you into assuming they cost pennies because you pay small amounts each time, but with a half a dozen sites hosted you can expect to get hit by top up warnings a few times a year.
I've just double checked my email receipts, and I had to top up $60 in 2020 just to keep those static zero-traffic sites up and running.
Standard, bare bones, shared Linux/MySQL hosting anywhere else will rarely set you back more than $40-$50 a year. There's really no commercial reason to choose NFSN.
Just thought I'd chime in to add my 2 cents, on the off chance that it helps someone here make an informed decision.
NFS is also great for small MySQL backed sites - for example your Wordpress blog or something similar.
Their pricing model is so transparent and predictable, and the support from Jeff and co is great (their documentation and FAQ is simply brilliant).
Also their domain registration and setup is a breeze - and they have great Whois privacy support.
These guys were doing pay-as-you-use pricing long before AWS came along. We still use (and love) AWS for our extensive production systems, but for simple hosting of smaller projects and / or personal websites, NFS is unbeatable.
Its combination of affordability and ease of use is simply the best.
My site is entirely statically-served; I have one script for rebuilding my local copy and a second for rsyncing to my NFS host.
> Currently we are not tracking (and hence not billing for) extra bandwidth usage. This is subject to change at any time.
What do you do if your small static site gets suddenly HN audience? Do you then pay thousands for the bandwidth?
For simple static sites, I always look at the egress rates and bandwidth caps. For example if you have Wasabi+Cloudflare, then you know the pricing before hand. Wasabi doesn't have egress fees even if Cloudflare were to redirect all traffic for a while to your files.
If you’re actively updating (or just better organized), NFSN is a good choice
How do you handle it?
I'll stick with Cloudflare for now