Creating a simple free website in 2025
I've owned mattsayar.com since December 2010. According to archive.org, it appears I started experimenting with Wordpress sometime in May 2011, but then switched to using Tumblr as my host in 2012.
For years afterwards, this site was just a simple index.html
on AWS S3 that said "Welcome to my website." There's a lot to be proud of there: free hosting, cloud-native, small footprint! But then I decided to start writing more publicly.
This post will focus on how I created the website you see today.
Since I work in security, my first order of business was to make my site secure. I remember Troy Hunt created httpsiseasy.com, so I started there. He made those videos in mid-2018 so some of the UIs are outdated, but Cloudflare is still a top-tier service provider.
Namecheap, my domain registrar, was also my DNS provider, so I switched that over to Cloudflare. I had trouble finding the right DNS config in Namecheap's UI because I immediately dove into the "Advanced DNS" settings, only for it be on the main page of my domain name's settings.
At that point I was struggling to get a secure connection between Cloudflare and my S3 bucket. I wanted to use the "Full (Strict)" SSL/TLS encryption mode because it's the most secure, but it wouldn't work. The only thing that WOULD work is the "Flexible" setting, and the Cloudflare UI does a great job of representing what that means visually.
I did some troubleshooting with ChatGPT and came to the conclusion that I would need to use Amazon's Cloudfront to ensure the connection between Cloudflare and AWS is secure. I'm not looking to complicate things, so decided against that. Good thing Cloudflare has Cloudflare Pages with a generous free tier!
I could've uploaded my humble index.html
to Cloudflare Pages directly, but I saw it also supports GitHub. Since I knew beforehand that I wanted to use Publii as my content management system (CMS), I followed their excellent docs to create a GitHub repo that would host my site's files.
From there, Cloudflare Pages has an easy setting to set mattsayar.com as the custom domain name to replace the ugly default Cloudflare Pages domain name. When you configure that setting, Cloudflare automatically creates the proper DNS records for you!
Like I mentioned a minute ago, I had an open tab for Publii on my laptop for a long, long time and figured it was worth giving it a shot. I first heard about it on HackerNews a couple years ago.
Publii is a desktop app that lets you pick a design theme and write posts/pages which you can publish by syncing your website with a hosting provider. It's pretty noob-friendly after you configure it. I set Publii up to publish to GitHub, whereupon Cloudflare Pages recognizes my GitHub repo is updated, and it will then deploy my new updates to all of Cloudflare's edge nodes.
Apparently these static (non-dymanic) site CMSs are a dime a dozen, and I didn't want to spend a large amount of time comparing the pros and cons of any of them, so I just picked that one. I worry that one day I may want more dynamic features, but that's a problem for Future Me.
And that's what creating a simple, free static website looks like in 2025!
Is this the easiest way to do it? Probably not. Sites like Wix and Squarespace exist so that you don't even have to know what "DNS" or "HTTPS" means, but you pay for those services. I'm thankful open source projects like Publii and various free hosting sites exist.
Comments