Ask HN: What free or low-cost static site hosting do you use most?
I still use Wordpress and shared hosting for most projects and microsites, simply because it's easiest and I'm not a developer. But I suspect there are better ways to do this in 2016/2017. Especially since I'm prepared to learn more.
Essentials: static hosting, custom domains, html, css, js Nice to have: php, FTP, markdown support
Am I missing out on AWS, Github, Digital Ocean, Heroku?
What are the pros and cons?
228 comments
[ 1.1 ms ] story [ 303 ms ] threadI like that I can check my changes on my notebook before uploading to the cloud.
(I have no affiliation with Netlify I just think their service is neat.)
[0] https://surge.sh/
[1] https://www.netlify.com/
[2] https://gilly.tk
edit: formatting
Does netlify provide the actual hosting or they allow you to setup deployment to a VPS? Also if netlify does the hosting, how good is their uptime/availability?
We host the sites on our CDN, which has more than a dozen points of presence around the world. You can either let us build your site using anything you can get working on linux (see https://www.netlify.com/blog/2016/10/18/how-our-build-bots-b... for details) or build it yourself and ship the finished product to us. Nothing "runs" on our side after build, so there are no servers/VPS's which you can configure in the equation as far as hosting is concerned. We let you do a few things that you used to do with htaccess files (redirects are free; custom headers including basic auth are a paid feature)
You can check out our list of past incidents on our status page to gauge uptime for yourself: http://netlifystatus.com/
Since we use redundant DNS (NS1 + self-hosted), and use dynamic DNS response based on both location the query comes from cross product which CDN nodes are responding, we can (and occasionally do) remove, rebuild, or add CDN nodes without affecting our overall service. Since we use multiple network providers (for instance we use AWS, but we also use 3 other services), downtime at any one of our providers won't introduce any substantial problems in our network.
You don't have to use any of our clients to deploy a site; they're just options in case you'd rather build the site yourself than have us build it. I rarely use the clients (we have one in go in addition to the Node.js version: https://github.com/netlify/netlify-go and further our API is scriptable in any language and fully documented here: https://open-api.netlify.com/)
You can (and we do this for you by default) configure GitHub, GitLab, or Bitbucket to trigger a build whenever you do something at the repo. The default, free behavior builds on pushes or PR's against your selected branch and if it's a PR, shows you a deploy preview rather than publishing at your main URL: https://www.netlify.com/blog/2016/07/20/introducing-deploy-p...).
Finally you can drag and drop a zipfile with your site's built contents, if you are in a hurry or less technically inclined.
So, you don't need Node to use us and I don't think most of our customers do use that client; most build direct from their repositories.
I'm amazed at how fast the site is now: https://portfolio.stavros.io/
PROS: It is free, always available, and the deploy is easy once you get the hang of git.
I added about 5 gbp two years ago and it's down to about 4 gbp. It's cheap as hell and I only have to dump 5 pounds on there every few years or so.
Their pay as you go makes totally sense when you have a static website that will be access sporadically and you don't want to rely in a public infrastructure such as Github.
I also don't want to depend on freemium services, because they could just shut down the free tier any time.
Also, Github Pages and Gitlab Pages are great and free. You can't beat free if it's reliable and both of those two are reliable.
https://neocities.org/
ZERO ADVERTISEMENTS, even for the free plan. Supports only static hosting, is free for 100mb websites with bandwidth of 50GB per month, or five dollars per month for 10,000mb with 2TB and a number of other extra features.
EDIT: As mentioned by detaro, custom domain only supported in the paid plan, see https://neocities.org/supporter
Works really well with creative coding frameworks like p5js or Twine, for fun, fast little sketches you just want to thrown online and share with others:
http://p5js.org/
http://twinery.org/
Also, they really care about resurrecting the ideals of the old internet:
https://blog.neocities.org/its-time-for-the-permanent-web.ht...
https://blog.neocities.org/default-ssl.html
If I'm understanding what you're trying to do, this isn't on our end. Neocities currently doesn't prevent sites from making API calls to other servers - that's on your HTTP server's side, you control that.
Occasionally I get requests to allow HTML hosted on Neocities to make API calls directly to Neocities itself - which would be OK for things like basic stats lookup, but for things like file uploading/deleting/editing this is dangerous, because it would allow attackers to write scripts to hack people's accounts that can be executed by their own browsers. This is called a CSRF attack, and that's why we prevent people from doing that.
> ZERO ADVERTISEMENTS, even for the free plan. Supports only static hosting, is free for 100mb websites with bandwidth of 50GB per month, or five dollars per month for 10,000mb with 2TB and a number of other extra features
Haven't announced yet, but these numbers are all increasing soon. Well, except for the advertising one. I'm literally in the datacenter right now working on it.
(BTW, the list on https://blog.neocities.org/ seems outdated - it doesn't mention that SSL article for example)
> Well, except for the advertising one.
What about the five dollars per month one?
The cost is almost nothing but we don't have a high traffic website. If you started getting billions of hits from expensive Cloudfront regions such as Australia or India, you might consider something else.
https://aws.amazon.com/blogs/aws/new-gzip-compression-suppor...
You'll save a lot on your bandwidth bill.
It's not a deal breaker, but it was enough to make me look for alternatives.
It could just as easily be connecting with s2n and authenticating both endpoints of the connection.
> CloudFront will use encryption when retrieving data from its storage service S3 (Simple Storage Service), so the content is protected all the way from where it is stored to the user's computer, according to Amazon.
1. http://www.computerworld.com/article/2518747/data-center/use...
CloudFront has its own IAM user that is permitted to access the contents of the bucket, which means that it has to use the API. I don't think it's even possible to access the S3 API without using HTTPS. Therefore I think it is highly unlikely that the connection is unencrypted.
I manage all my sites there. Never had any issues with them, there is SSH access too so I recently set up a Hugo bitbucket pipeline which builds my personal website and rysncs it to dreamhost.
They were very fast to add lets encrypt support, so all that stuff is taken care automagically. Reliability is very good.
why: free, cdn, version-controlled, continuous integration, https, custom domains.
Wish there was a poll option on HN. How are you going to count OP? Will you share the results?
Pros: Generally works well, speedy enough, free ssl with Cloudfront, cheap for many sites (most hosts charge per site which catches me out for little projects). I've mostly got the process figured out now...
Cons: not easy or quick to set up, lots of steps to get right, AWS is a terrible UI, Cloudfront invalidations are apparently sent by carrier pigeon so asset hashing is a must, even then it can take a while to see your site updates
I've noticed a high mortality rate among static hosting sites, particularly those "just add files to Dropbox and we publish your site" services. Static hosting services are to ops people what todo list apps are to frontend designers
Also, to your point: you can't, by definition, run php on a static site.
Check out the s3_website Docker container by attensee. We have it in our BitBucket pipeline, so that any push to the hosted repo will automatically copy the latest updates to our S3 bucket AND invalidate the respective assets quite quickly.
Any website refresh our developer in the US does now is usually available to look at within a minute here in Australia.
Edit: Looks like it's because they're using Atom and ARM based servers.
[1]https://ark.intel.com/products/codename/54859/Avoton
We also have a distributed team updating and looking after our website, and we use BitBucket as our git repo. Recently implemented their Pipelines feature to auto update the S3 bucket and refresh CloudFront resources with any changes pushed to the repo.
Makes it really easy now - just a 'git push' and Bam!, the website is updated and CloudFront auto invalidates all the old assets and starts serving up the new stuff. Really smooth.
Both my servers (DO vps and basement) run Ubuntu 16.04, I use PHP-fpm for PHP, domains I purchase at a local registrar (.nl domains are about 10€/year), for ssl I use lets encrypt. For simple sites I always use Bootstrap for the css.
FTP is implicit if you count SFTP as FTP (FTP over SSH). Under Linux SFTP is mounted as easily as any network share.
At home I run a Nextcloud instance and share some directories as Nginx roots, that means I can locally (even on my phone) edit a static web page and it is synced immediately to the webserver's root folder. This can be quite convenient.