Continuing experiments with static site hosting. Using Netlify
I wrote about my experiments with GitPages, but couldn’t use it for a site like Talotics or my other sites because it doesn’t allow commercial use.
Netlify have a generous free plan that can host up to 300 sites, with 100GB bandwidth. And the sites can be deployed automatically from Github.
Since I have two repos on github
- talotics-source, the source of this site
- talotics-public, the generated static html produced by running
I was using a Github action to ftp the site to my web host.
I decided to experiment with Netlify as the host.
Creating a site and hooking it up to Github was fast, and was live in seconds with a
Netlify can also ‘build’ the site and deploy the ‘static’ folder, but I have already configured it with the two repo setup from GitPages which offers more long term flexibility if I choose to move host.
Adding my talotics domain to netlify was fairly simple.
I went through the process on Netlify, then changed the DNS entries on my main web host.
This took about 10 minutes to go live.
Then pressing the button to add the ’lets encrypt’ SSL certificate took about another 30 minutes to propagate around the world.
http and https
I didn’t have to add any extra configuration for https or amend an htaccess file to redirect. Netlify does that automatically.
Netlify doesn’t host email, but there are free email services available.
My old web host offers email forwarding for staged domains i.e. those without hosting. So I added an MX entry for the domain in my old web host to forward the emails to my gmail account.
This was all surprisingly easy.
The pricing for additional addons would make hosting on a paid plan on netlify more expensive than my current hosting, but I don’t think I’m going to need any of the additional services.
I will experiment with this for a while but it does seem like a very easy way to setup a static web site. And having the auto deploy from Github with no additional configuration is a large time saver making it even easier.
And, if for some reason you didn’t want to connect it to Github, it is possible to simply drag and drop HTML files to the netlify config page and deploy that way.