Hey! Listen! This post is part of a series on deploying Hugo. Check them all out!
|2022-02-08||Deploying Hugo with Netlify||Deploying on Netlify|
|2021-10-13||Deploying Hugo with CloudFront and S3||Deploying on CloudFront and S3|
|2021-09-21||Deploying Hugo with AWS Amplify||Deploying on Amplify|
In my last post, I was testing the deployment of Hugo with CloudFront and S3. My main complaints came from the complicated Terraform setup and the lack of easy redirects. Since Amplify and CloudFront+S3 are the only AWS-based offerings, I decided to check out alternatives outside of the AWS umbrella.
Static site hosting
As I’ve mentioned before, this is a static site. This site doesn’t need to be hosted on a VPS (which I need to patch and maintain), it could be hosted in the cloud, or completely on a CDN. There are a ton of developer-focused static hosts out there. A few I considered are below:
They generally all offer a git-based workflow where you make commits to a branch, the host builds your website from the latest commit, and then publishes it to their CDN. Each has their quirks, but Netlify seemed to have the most features and came the most recommended via Reddit. On a side note, check out this excellent post by Kev Quirk comparing static site host performance.
The setup couldn’t have been easier. Again, following Hugo’s official documentation, you basically tell Netlify what GitHub repo you want to use and it will rebuild your site any time there is a commit.
The site URL Netlify gives you is something like
brave-curie-671954.netlify.app, but you also have the option to use a custom domain (like
What I liked
- Ease of setup - Like AWS Amplify, this took less than 5 minutes to setup. Within 10 minutes, I had the site running on my custom test domain. Couldn’t have been easier.
- Git-aware by default - Like the other static site hosts, git is a first-class citizen here. Plenty of features around branches, pull requests, etc…
- HTTPS - Netlify offers free SSL certificates (via Let’s Encrypt) for all their sites. They also support HTTP/2 when HTTPS is enabled.
- IPv6 - Netlify doesn’t enable IPv6 by default, but it’s available if you use their DNS manager.
- Redirects - No serverless functions here, just a simple config file to do redirects and URL rewrites.
- Custom headers - The same config file also supports custom headers.
What I didn’t like
- IPv6 support only when using their DNS manager - I’m very particular about my infrastructure and manage my DNS with Route53 using Terraform. This is probably a niche use case, but if you want to use Netlify with a custom domain, with external DNS, you can’t have IPv6. Netlify offers an IPv4 load balancer IP, but no equivalent for IPv6. I found a few forum posts requesting this feature (one, two, three), so I can’t be the only one who wants this. I’d like to see Netlify add an IPv6 endpoint to their load balancer (apparently this is a limit of their DNS provider, NS1) or create a Terraform provider to allow programmatic management of DNS records.
Ultimately, I choose the tear down my Netlify demo site in favor of my plain-old Nginx server. If you’re keeping track, the score is:
If you host a Hugo site, tell me how! I’m open to any options!