You may have (or haven't) noticed that the site has moved from Github pages. There's one main reason for that, which is privacy, or at least a little more than usual. A few other things have changed as well, some cosmetic, others functional (JS pagination! In 2019! Amazing!). Here's what's up with this blog post though. When looking for WHERE to move the site to, the obvious choice is a cloud storage provider. The big three come to mind, which would be Amazon AWS S3, Google Cloud Storage, and Microsoft Azure Blob Storage. Well, I have some things to say for each which are why I decided to choose none of the above.
The big issue here is that when setting up a static site on S3 with a custom domain, your container name needs to EXACTLY match your domain name. Well, as you might be able to guess, that's REALLY stupid for a domain like mine, which is obviously going to be used by someone else. Did I mention that container names are global? Yeah, that's annoying. Basically, someone else has my container name that I want and I can't do anything about it. And then there's a different debacle of not being able to move my domain to AWS Route 53. See, my domain is marked as "Premium" and even though my host (Name.com) allows me to move it away from their site, Route 53 won't let me move it in. Even when it would be cheaper with them and give them my business! Pricing wise it's definitely the most expensive of the bunch as well, even if it is only about 50 cents a month.
A lot of the same here. Storage containers are again, globally unique and must exactly match the domain name. I didn't even bother trying to set things up here because of what I learned from experimenting with AWS. It is cheaper than AWS though.
This was the most promising of the bunch and the cheapest with 12 months free to start. Instead of containers having to match your domain exactly, you can have it be named whatever you want! Storage ACCOUNT names are globally unique, which is why it's immediately better. Set up your account and make a static website with it, which will create a special $web
blob for your site. Then just point your domain at it and you're all set.
Almost.
That's where it being great ends. See, Azure static websites don't work with HTTPS, which I found out after too much searching. And that's a problem. A MASSIVE problem. I want, regardless of what people type, for them to get to the same place, without any certificate errors or whatever. If you want your site to actually function like any normal, modern website should act, you'll want all of the following to point to the same place. And oh boy, that's impossible. Thanks TLS or SSL or whatever. You've made a simple job impossible. To do that, you'll have to use Azure's CDN instead of the basic custom domain option in the blob. If you've enabled it previously, you'll have to turn it off, because you'll get other errors. Again, figured out through trial and error, because there's like 4 different versions of a Microsoft Azure static website tutorial in their official documentation. Never covered.
Here's what should point to the same place. Subtle changes in each one:
http://domain.tld
http
s
://domain.tld
http://
www
.domain.tld
http
s
://
www
.domain.tld
Now let's start with the basics of the modern webpage: a www domain and a bare domain should both point to the same place. It's essentially implied at this point. But according to Azure, a bare domain, even if you have the proper DNS rules to point your domain to the CDN endpoint, literally doesn't work. Try any combination of A, CNAME, ALIAS/ANAME records. It just doesn't work. Whatever right? Just set up the www subdomain to do things correct and point the bare domain to the www subdomain. That works right?
NO!
Because now the certificate that's been issued for the subdomain doesn't work for the bare domain! And you can't use wildcards to create your custom domain in the CDN because that doesn't work either and gives other issues! I spent over 8 hours on this. A simple static website. And it still didn't work right.
Make your life easy and just use Netlify for your static site. It pulls your stuff from a Github repo (which can be private), and puts it on your site. DNS setup is easy as well, set up your nameservers to be the netlify ones, add two ANAME/ALIAS records for both the bare domain and www subdomain to point to the netlify endpoint, and you're done. Push to the repo and it updates the site. Also you can log in with Github, so no extra auth needed. All the dumb certificate stuff is taken care of, and all of the http gets redirected to https and the www redirects to the bare domain. As expected in the modern era. And it's completely free for personal sites. Without a doubt, the only choice, and the one I should have made from the start.
Total time spent moving to Netlify from Github Pages: 15 minutes. Total time spent bothering with other cloud stuff: Too much.