Notes on migrating this blog to Netlify and Hugo

2018-10-03 16:33:56 +0000

Written mainly for my own record.

This blog is a static website generated using Hugo. The sources are hosted on GitHub and the website is compiled and served by static website hosting service Netlify, which monitors the afermentioned git repo and recompiles the site each time it sees a new commit.

The content can be added or modified using git directly or via forestry.io. Forestry can access a GitHub (or GitLab) repo containing source files of a Hugo project and commit content on user’s behalf.

The domain name is unfortunately still with my old provider.

DNS configuration

Unfortunately, my domain name provider (Domain Factory) doesn’t support domain name flattening. I ended up implementing the setup described here: https://www.netlify.com/docs/custom-domains/#dns-configuration

The www subdomain points to my primary domain at Netlify while an “A” DNS entry is used to point the APEX domain to Netlify’s load balancer’s IP address. Apparently this makes load balancing and regional content distribution more difficult.

wergieluk.com   A   104.198.14.52
www.wergieluk.com   CNAME   agitated-hodgkin-44.netlify.com

Takeaways

So far I am very happy with Netlify. The setup was super smooth and everything worked out-of-the-box. They even automatically provisioned a free SSL certificate from Let’s Encrypt. The documentation is another strong point of the offering: https://www.netlify.com/docs/