tl;dr: if you’re reading this, then everything went exactly as hoped and my website is now served via Netlify. Only carry on reading if you care about the why and how or desire useless historical details about this stuff.

This site has gone through a few changes over the past 19 years. Initially I wrote it all in PHP, with a MySQL database serving up XML-formatted content that was pull-parsed and converted into HTML via Smarty templates. Then one day I got a little more traffic than anticipated and the entire thing fell over due to my complete disregard for caching - soon rectified by adding Memcached to the stack. Looking back, knowing everything I know now, it makes me shudder.

My second iteration was better, same stack (mostly, I think) but I added on a whole blogging subdomain with a custom editing interface and support for comments. It was glorious and worked surprisingly well, but ultimately as it aged and became less and less compatible with newer versions of PHP, I had to iterate again.

So for the past few years, this site has been created with Hugo, versioned on BitBucket then GitHub, and served (initially) via NginX and (latterly) via Caddy hosted on a DigitalOcean VPS. The move to static generation simplified the site greatly, and removing all dynamic ability (i.e. my custom admin panel and commenting backend) made everything more secure by default. GitHub webhooks were used to trigger draft/production deployments through Caddy.

The Hugo/GitHub/Caddy/DigitalOcean solution has been serving me well for the past few years, but making changes was still rather painful, and so this Christmas I decided to see if it could be improved by relinquishing some control of the stack to a CDN.

First I tried using the new and exciting service Render that I’d heard good things about, but despite a great UI and generous allowance within the free tier, a few small issues made it unsuitable for my particular user case.

The first was being unable to specify or pin the Hugo version used by the deployment pipeline. I was using templates built for an older version of Hugo (v0.54) that were failing to compile on whatever version Render was using at the time (v0.81?) - and being unable to specify the right version made this hard to quickly rectify (see feature request). Ultimately though, updating my templates through a mass search-and-replace of shortcode syntax to make them compatible again was easy enough. However being unable to pin the build process to use a particular version of Hugo was still a concern.

The second issue was redirects. This site has had a few different forms over the past couple of decades, which has resulted in a list of 180 path redirects to avoid breaking links on external websites. Render allows redirects to be specified, but seemingly must be entered one-by-one through an online form - which kept losing them! Painstakingly frustrating. (I assume their API provides a cleaner mechanism, but I much prefer Netlify’s approach that I’ll cover later - fortunately this feature is on the way.)

However the critical issue that led to me abandoning Render related to how trailing slashes are dealt with in page URLs. For consistency, I had Caddy configured to always add trailing slashes to pages, e.g. visitors landing on /design/making-dust would always be redirected to /design/making-dust/. I really liked this consistency (and if I really cared for SEO, apparently this is beneficial) but unfortunately Render did not handle this (see feature request), which combined with the previous annoyances led me to fall back to Netlify.

Netlify is older and better known than Render, which makes it a little boring, but turned out to be a better fit for me. Firstly, it allows me to specify a particular Hugo version - no more site breakages because of template processing changes! Second, redirects are specified in a _redirects text file at the root of the deployment - which already closely resembled how I was managing them before with Caddy. And crucially, it handles trailing slashes the way I like them.

Like Render, Netlify competes with a generous free tier and provides a good workflow for running test site deployments via GitHub PRs, which is far nicer than what I had before. Annoyingly they charge $9/mo for access to visitor statistics, but given I rarely look at them anyway (and refuse to add JS-based trackers due to privacy issues) then I’m happy to go without.

Overall, I’m liking Netlify a lot - but also can’t wait to try Render again if the issues above are addressed. I was very impressed with how easy it was to get going with both providers - the onboarding experience was great and the fact I haven’t paid a penny for any of this is astounding.

Obviously there are costs involved. I’m now depending on Netlify’s CDN and DNS services being reliable and secure, but I trust that they know what they’re doing. I also have less control over the specifics of the hosting and how visitor data is handled - the latter particularly is a concern to me, and will not hesitate to move again if I become uncomfortable with this solution. (This website may not hold any personal data about me or its visitors, but everyone’s privacy is still important.)

Anyway, well done and thank you Netlify - but look out for Render!