The last time Hackerfall tried to access this page, it returned a not found error. A cached version of the page is below, or click here to continue anyway

Hosting My Static Site

So youve built a static site, but now you need somewhere to host it. Luckily, hosting options for static sites are cheap and plenty due to their size, simplicity, and security. I had some time to compare a few options and decided to document my choices. The hosting providers I looked at were GitHub Pages, Surge, PubStorm, and Netlify. Let me know if there are any others I should have taken a look at! I ended up choosing Netlify as my hosting provider and this post explains that decision.

Why Not ________?

Because I said so. No Mom, its because Netlify really is better than the other options. Lets go through the hosting providers and see why I didnt pick them. The first provider I looked at was GitHub Pages. Thats because I was already using them with a Jekyll site and its FREE! I didnt go with them because the lack of ability to customize. Sure, I can use a custom domain, but I cant get SSL on it. I also dont like to have separate branches for the build and source directories, but thats more of a personal preference (and probably a lack of git skills). I enjoy being able to push my updates and seeing them deploy instantly, but I found other options that do just that.

In my search for a hosting provider, I was first led to Surge and their simple, single-command publishing. After installing with npm, just cd into any directory you want to host and run surge. Now you have a website running on a random subdomain of theirs in a matter of seconds. Theyre a great option for spinning something up and seeing how it looks, but I didnt get what I wanted from them out of a hosting provider. They offer custom domains for free, but youll have to chalk up $13/mo for SSL on that custom domain and not get that much more. While I may not have went with them, they did open my eyes to this kind of simple deployment.

The next provider I looked at was PubStorm. They stepped it up a notch by offering SSL for free on your custom domain, but they took a step back with a PubStorm watermark (they do fade it out after about 30 seconds). Another advantage of PubStorm is its price. Their only paid tier is $5/mo and you get a few upgrades but nothing to write home to mom about. Id honestly just stay on the free tier. So PubStorm was a step in the right direction, but I still felt limited.

Why Netlify?

When I eventually came across Netlify I was rather impressed by them compared to their competitors. They have a sufficient amount of posts on their blog, and the most dense documentation of the bunch which means more customization. Their UI is nice and easy to work with, and the features they offer improved my development process. With all of this considered, I feel like they give me the most bang for my buck.

Netlify makes sure deployment is one less thing to worry about. They have an awesome new feature that deploys any branch to a unique URL. Now when I need to add a new feature, I create a new branch, push my changes, check the result on a unique domain, merge the changes, and have it deployed instantly. Whats even better is that they use atomic deploys so youre site doesnt look out of sorts during the build, unlike uploading over (S)FTP. One of my favorite features is their sexy Slack notifications.

This is not only a cool feature, but it also speeds up my development process. Usually, I set up a local domain, a staging domain, and a live domain, then set up some continuous development with Codeship and try my best to keep it all maintained. Although its been life saving in most instances, its certainly a huge headache to deal with. Netlify solved this problem for me by creating the one-off unique URLS for staging that I can quickly assess by clicking the link on my Slack notifications. Once I deem it a success, I can merge the changes and be confident the live version is up-to-date and looks good

Not to keep harping, but those are just the features Im currently using. Other awesome stuff includes being able to modify your headers for cache control, snippet injection for things like Google Analytics, and unlimited rollbacks for versioning. Theyll even handle all of your form submissions and send you notifications of your entries in Slack and/or email. Say whaaat? They also optimize all of your assets for you. Goodbye Gulp! If thats still not enough, you can also create webhooks for API integration. This also means you can hook up your site to Zapier which opens up a whole can of worms in regards to integration.

To summarize, PubStorm and Surge are both great options for spinning up a quick website for development purposes. However, Netlify is the best option for hosting a static production site. Do you agree or disagree? Hit me up on Twitter (or somewhere else) if youd like to discuss more about this!

Continue reading on