Static sites are all the rage right now. We've come full circle. Remember the 90's when Geocities was popular? Static site hosting is little like a cutting-edge version of Geocities. I've personally built a few Middleman and Jekyll sites, which prompted me to wonder about static site hosting options.
As you probably know, part of the appeal of static sites is that they're very low overhead. You don't need a LAMP stack, and you don't need to be paying a
Researching static site web hosts, these were the kinds of criteria I considered:
- Ease of deployment (can you push changes from the command line?)
- Redirects support (e.g., 301 redirects)
- Static site form endpoints
- Intangibles like sexiness of the UX/UI
Without further adieu, here are the best static site hosts.
Github Pages is a favorite among people that like to hack together static sites. It has serious advantages, but it didn't turn out to be the right solution in my particular case.
- Free, but it's limited to one per username unless you subscribe to premium.
- Convenient deployment. Just commit your changes and type git push -u origin master in the command line and your changes are live. Most people already use git for version control and so there's the appeal of not having to use yet another app for hosting.
Amazon Web Services
Amazon Web Services is one way to deploy a static site for free. It's fast, cheap, and reliable.
I personally found that AWS was an unsexy, not-so-user-friendly solution to static site hosting.
If you want to go down this route, here's some further reading:
Pubstorm is a lesser known service that like Github, let's you deploy static sites from the command line. PubStorm is a product from the makers of the Nitrous IDE. It's a fun tool and very easy to use. Once PubStorm is locally installed on your machine, you just need to type:
cd /workspace/myproject Storm init Storm publish
- Lightning fast CDN
- Free custom domains
- Use PubStorm for free on up to 10 websites
- Versioning and rollbacks
- SSL certificates
- Deploy from the command line with <code>storm publish</code>
- Asset optimization
- Analytics (total bandwidth consumed, unique visitors, and popular pages)
- No 301 redirect support
- Free version puts a tiny PubStorm logo on the bottom-right corner of your website
Netlify is one of my favorite products in this space. It boasts some serious features that cater to the static site crowd. Things like static form endpoints, Zapier integration, webhooks, custom redirect rules, prerendering, and prioritized CDN traffic.
One quandary with static sites is you can't just add add a typical server-side, PHP contact form. The workaround is that you can add a form that posts to an external endpoint. I'm talking about free products like Formspree:
<form action="https://firstname.lastname@example.org" method="POST"> <input type="text" name="name"> <input type="email" name="_replyto"> <input type="submit" value="Send"> </form>
However, Netlifly has this functionality baked in. Just add the netlify attribute like so:
<form name="contact" action="thank-you" netlify>
- Free Custom domains
- Letâs Encrypt TLS Certificates
- Continuous Deployment
- Custom redirect rules
- Hooks & Notifications
- Basic ($9/site/month)
- Password protection
- Form handling
- Advanced proxy rules
- Pro ($49/site/month)
- Deep Git integration
- Custom TLS Certificates
- Asset Acceleration
- Domain aliases
- Global ($349/site/month)
- Geo-IP (Language-based geo-local redirects)
- Prioritized CDN traffic
- Redundant DNS
- High performance Build environment
- Enterprise (000/site/month+).5. This pricing model is nice for people that like to test the water.
- Dedicated account manager
- Custom support contracts
- Prioritized feature requests
- Upgraded SLA
- Pricing is a little steep. If you're someone like me that enjoys building lots of microniche websites, then the per-site per-month pricing model gets prohibitively expensive quickly.
BitBalloon is the one hosting product that I haven't used personally on this list. But that shouldn't deter you because it has some major perks.
- Affordable Pricing (free, $5/month, enterprise)
- Supports drag-and-drop deployment if you're not a fan of the command line
- Robust CDN, lossless image compression, caching headers, minification of JS and CSS assets
- Out of the box database, export tools, email notifications & integration with 3rd party services
- Inject 3rd-party code snippets
- Versioning and rollbacks
- Password protection
- Free version of the product doesn't include a custom domain. In other words, you're restricted to my-project.bitballoon.com until you buy they're premium product.
DigitalOcean is extremely versatile and not designed specifically for static sites. Nevertheless, it's a great way to host static websites.
You can create a $5 droplet in 30 seconds, which creates a virtual server with 512 MB memory and 20GB SSD storage.
For my project, I created a Ubuntu 16.04.1 x64 droplet to host a few different small static sites. Digital Ocean charges you by the hour in a prorated manner. So if you deploy a $5 droplet and only use it for 15 days, you're only out
Digital Ocean integrates nicely with IDEs like Cloud9. It's great to have access to the backend to configure things like 301 redirects.