4 ms·
Hosting My Static Site
- paulrosenzweig 10y agoTo be honest, I hadn't heard of any of these static hosting providers. I've used S3/Google Cloud Storage with Cloudflare to get SSL. For low traffic sites this setup is effectively free and very easy to set up.
- calavera 10y agoHi, Netlify CTO here. It's great that a combination of those services works for you. Our initial tier is completely free, $0. No costs per traffic nor storage, unlike S3. Please, feel free to send questions and I'll be happy to answer them.
- mplewis 10y agoDid you pay to have this piece written? It's suspicious that the author is so in favor of an overengineered solution for something as simple as static site hosting.
- singingwolfboy 10y agoThe author didn't even consider hosting on AWS directly, using S3? It's super cheap -- the biggest expense is buying a domain and hosting DNS. And HTTPS is straightforward as well, thanks to Certificate Manager! I recently wrote a tutorial for how to get a static site set up with S3 and CloudFront: https://www.davidbaumgold.com/tutorials/deploy-static-site-aws-s3-cloudfront/ https://www.davidbaumgold.com/tutorials/deploy-static-site-a... I'm curious if others would find it useful?
- el_benhameen 10y agoMy personal site uses S3, but I hadn't thought to set up cloudfront in order to enable SSL. This is perfect, thanks!
- doingmyting 10y agoI wouldn't call using AWS straightforward unless you're a developer. Heck your own tutorial is about 10 pages/screenfuls long.
- umbs 10y agoA quick glance indicates your tutorial is the right one for me. I'll follow it and update my personal site this weekend and perhaps provide you feedback?
- calavera 10y agothat tutorial is pretty awesome, very well written. Netlify can do everything you explain there by running one single command line. Check this video out: https://www.youtube.com/watch?v=IfFenanuRnc&feature=youtu.be https://www.youtube.com/watch?v=IfFenanuRnc&feature=youtu.be
- ChristianBach 10y agoGreat tutorial. Really well written, I'll check out what else you've written for sure. It is how ever ~20 pages long. And all of it can be done with a _single_ commandline in Netlify. Just saying :)
- stevejohnson 10y agoFor you folks keeping track at home, Netlify is $108/yr for the lowest tier that lets you use a custom domain, while grandparent's advice is about $7/yr ($6/yr for Route 53 + "negligible" hosting and bandwidth). Not to dump on Netlify, just reacting to those sly little not-really-equivalent promotions.
- ChristianBach 10y agoThat's not correct. Actually the completely Free tier gives you custom domain and HTTPS. And it also gives you Continuous Delivery. Again for free. And for open source projects you even get the Pro Tier for free. (discl.: As written in post below, and in my profile description I'm from Netlify)
- jlgaddis 10y agoIf you're really a cheapskate and don't wanna pay $6/year for Route 53, Hurricane Electric offers free anycasted DNS hosting [0] for personal use. (I don't currently use it but I have in the past, primarily because they'll slave off of your own master.) [0]: https://dns.he.net/ https://dns.he.net/
- stevejohnson 10y agoIt looks like I was incorrect, and ChristianBach is right. I'm sorry for spreading misinformation. I misread their pricing info.
- halisaurus 10y agoNice guide. I have my personal site on the same AWS S3/Cloudfront combo and I effectively only pay for the domain name ($12/yr) and certificate (~$35 for a 2 year?). AWS invoices me monthly for ~$0.05/month in fees with a credit that erases the charge, so I'm not actually paying for hosting. If you're unfamiliar with AWS it can be daunting, but it's mostly initial setup to get it working then uploading changed files whenever you update the site, which was a better choice for me than $5/$10/whatever each month for little or no additional benefit. I'd recommend it for anyone with a static site. I think you'd need a lot of traffic and/or updates to the site to incur $10/month in fees on AWS.
- calavera 10y agoI agree with you, $10 in AWS fees sounds like a lot of traffic. That's also why Netlify has a free tier. We leave paid plans for people with more traffic. We event have a redundant DNS service for people that really really need it. For your needs is completely free of charge and hassle :) PS: As I pointed below, I'm the CTO of Netlify.
- halisaurus 10y agoI was just looking at your pricing. :) All in all Netlify does offer a compelling service for this scope. I'm also interested in the Pro tier being free for OSS, that's fantastic! To be fair, setting up AWS for the first time is a real PITA and I happen to have had it all set up (IAM, buckets, command line, etc) already, so my barrier to entry was low. Had I known of Netlify when I first moved my site to AWS I probably would have gone with Netlify for the convenience and free HTTPS cert.
- kctess5 10y agoI was just about to say the same! I've been VERY happy with my AWS static hosting via cloudfront. It's cheap, fast, and reliable. I can even deploy my site from the command line with this [1]! It's very fast because it only pushes diffs. I use a bit of command line scripting to create an zip archival copy (for historical reasons) and to push the site to AWS just by doing: $./deploy.sh [1] https://github.com/laurilehmijoki/s3_website https://github.com/laurilehmijoki/s3_website
- rolodato 10y agoGitLab Pages does support uploading your own SSL certificate, unlike GitHub: https://about.gitlab.com/2016/04/11/tutorial-securing-your-gitlab-pages-with-tls-and-letsencrypt/ https://about.gitlab.com/2016/04/11/tutorial-securing-your-g...
- StavrosK 10y agoI've tried gitlab pages out and love it. I don't understand why I'd pay $9 per month for a static site when there's a myriad options that are free and great :( Gitlab even automatically builds with any static generator you want and deploys it.
- calavera 10y agoNetlify Pages is our free tier that offers a few things that GitLab Pages doesn't offer. For instance, we build merge requests for you and integrate them with commit statuses. So you get a real development workflow for your websites. Check this blog posts out: https://www.netlify.com/blog/2016/07/20/introducing-deploy-previews-in-netlify/ https://www.netlify.com/blog/2016/07/20/introducing-deploy-p... https://www.netlify.com/blog/2016/08/30/introducing-deploy-contexts-in-netlify/ https://www.netlify.com/blog/2016/08/30/introducing-deploy-c...
- StavrosK 10y agoDid you guys change it recently? I remember it being $9/mo the other day for a custom domain, which is pretty much a prerequisite for everyone. Your current pricing is much more attractive (of course, it's free)!
- ChristianBach 10y agoHi StavrosK, you're absolutely right :) We did change it recently. Now Netlify Pages (Free plan) includes Custom Domain and HTTPS. It also gives you Continuous Delivery. Again, completely free of charge. Lastly, any open source project get's the Pro Plan (normally $49 per month) for free as well :)
- juandazapata 10y agoAWS S3 with static website enabled. Put a Cloudfront distribution in front of it. The whole thing won't cost you even $1 USD/month. Infinite scaling. Great tooling.
- mordocai 10y agoLet me use something besides awful cloudfront and I would so do this. As it is, I just run it in my amazon VPS that I have for other things anyway.
- themartorana 10y agoYou mean amazing, super-scaled CDN Cloudfront with support for free SSL certificates, S3 bucket origins, API-based invalidations with S3 deployments, and so many more features than I can mention here? I'm sure you meant that. Edit: we host all our sites - main site, engineering blog, press kit, and so on using Cloudfront in front of S3, and not only is it all-the-way fast (which we get comment after comment on) but it's cheap as all getout. https://tech.flyclops.com/posts/2016-04-27-flyclops-sites-static-ssl.html https://tech.flyclops.com/posts/2016-04-27-flyclops-sites-st...
- mordocai 10y agoYou mean the awful gatekeeper of the Internet that soft-blocks tor and causes problems with legitimate traffic (tor or otherwise) across the world? Yeah, that one. Edit: As informed, I was confusing cloudfront and cloudflare.
- bbatsell 10y agoYou are confusing Cloudfront and Cloudflare.
- Tomdarkness 10y agoYou do realise CloudFront (https://aws.amazon.com/cloudfront/ https://aws.amazon.com/cloudfront/) and CloudFlare (https://www.cloudflare.com/ https://www.cloudflare.com/) are not the same?
- damaru 10y agofor static site, can't you use any shared hosting and have 1000sites for 3$/month? Not sure I follow the logic behind the article.
- maaarghk 10y agoI would have thought so too. Then you can get your simple deploy by adding your provider to ~/.ssh/config and setting an alias for scp -R ./public_html sharedhosting: in your shell rc file .. seems much easier than all this! you can even stick `gulp build && ` at the start of your alias if it so pleases you! Then again if cloudfront + s3 can indeed come in at under $1 per month then I can see why you'd go down that route. I'd like to see what kind of sites you can host for that cost.
- damaru 10y agoYes I'll definitely expand my cloudfront + s3 for my next projects - to see how that could help. The only + for shared hosting is that I offer free shared hosting email with any hosting for my clients. Email are getting to be an expensive commodities.
- superkuh 10y agoStatic site? Self host from home.
- rb808 10y agoyep, the cloud is overrated. I have my static site running on a raspberry pi, works great. BTW google domains has great ddns.
- jmagoon 10y agoDo you use dynamic dns or pay for a static IP? Seems like more trouble than it's worth the first and more expensive for the second.
- superkuh 10y agoComcast changes my IP about once per year. I notice within a half day or so and manually update the A and AAAA records for my dot com, publish an update for namecoin domain, and my Tor address doesn't need updating. I've been self-hosting for almost two decades now with no problems.
- viraptor 10y agoIf you live in the right location, have enough bandwidth, and are sure you can properly isolate the host on your home network - great. Otherwise it's not the best solution.
- tomc1985 10y agoLiterally ANY host that gives you an FTP drop works for static sites. Bluehost Dreamhost Namecheap Godaddy Mom and Pop's Web Hosting Shop etc etc Not sure why such a topic needs more than about 1 paragraph's worth of commentary. Why does this guy needs support for all these fancy features? It's a static site! Do people simply not pay attention to history? Leave it to the "hackers" to complicate something as simple as static hosting.
- rybit 10y agoSo static sites really have come a long way from the 1994 geocities versions. There are people that statically build sites with 1000's of pages. The idea is that you don't need to have the whole backend that we've all built before is growing (look at things like the serverless movement). As soon as you have to do more than a junk website that you check occasionally and care about the actual user experience you need to start considering things like CDNs, cache invalidation (global consistency matters) and C/D integrations. This is why you have a growth of static site hosting services (and hence the article). Some good references: http://www.staticgen.com/ http://www.staticgen.com/, http://jamstack.org/ http://jamstack.org/, https://www.smashingmagazine.com/2015/11/modern-static-website-generators-next-big-thing/ https://www.smashingmagazine.com/2015/11/modern-static-websi... also (talking about 1994 sites): http://www.warnerbros.com/archive/spacejam/movie/jam.htm http://www.warnerbros.com/archive/spacejam/movie/jam.htm is alive
- tomc1985 10y agoThose are ages-old issues that have had solutions before the creation of all this fancy tooling. You can invalidate cache with fake (ignored) URL parameters (http://foo.html?hello http://foo.html?hello) or HEAD section declarations. CDNs are no different, your links simply point elsewhere. Presumably some finishing script could capture your CDN'd data and copy everything to the appropriate place. How does continuous delivery integration even have anything to do with transferring files to a hosting drop? How is it that an FTP drop is insufficient for integration testing? A static site host is simply a webserver returning the HTML file you requested, nothing more and nothing less. Everything relevant that the server returns is under the control of the developer who made the page. The things you describe are value-adds; or, as I like to call them: crutches.
- mslev 10y agoI use nearlyfreespeech for most of my hosting.
- mluggy 10y ago+1 on setting up an s3 bucket, cloudfront distribution, ssl sni, route 53 rules and simple "aws s3 sync" command with some cache-headers. Initial setup might take an hour but further deployments are pretty instant.
- tejaswiy 10y agoSurely HN knows how to host a static site without needing advice from the blogosphere..
- BatFastard 10y agoThis whole things feels like an ad.
- viraptor 10y agoAlso submitted by a "Customer acquisition consultant to B2B tech companies." (info in the profile) and 2 Netlify people are here to respond to questions within 20 minutes of posting. I could be wrong, maybe it's just a complete coincidence or maybe gk1 did submit a real/"natural" post for Netlify. But it does sound like an ad that misses quite a few of known host sites almost on purpose. I mean, the 3rd link to "static site hosting" on google is amazon. (1st netlify)
- juliangoldsmith 10y agoAlso suspicious is that the blog only has three short posts, the oldest of which is in June. Two of the posts are on static sites, one of which is the one in the OP. There are also multiple issues with the Projects section on the author's homepage, including multiple sites with descriptions of "This is an example description," and one broken link. EDIT: Looking at the OP's submission history, he has 6 submissions about or related to Netlify in the past 30 days.
- BatFastard 10y agoWhats the policy for dealing with abusers? (Imagines poles and fires.....)
- jlgaddis 10y agoPreviously, when I've noticed flagrant violations (e.g. HN account that has only ever submitted articles at example.com, never commented, participated, etc.), I've e-mailed dang (hn@) and those accounts have been taken care of pretty quickly.
- fixxer 10y agos3_website is just about the easiest blog deployment system ever.
- p4bl0 10y agoWhat about Neocities? They provide HTTPS for every site, even without paying. I don't need it because I have my own servers, but I really think what they do is great. For example, each website they host is archived on IPFS :). https://neocities.org/ https://neocities.org/
- angryasian 10y agohttps://firebase.google.com/docs/hosting/ https://firebase.google.com/docs/hosting/ also provides a free tier of static assets hosting
- ohadpr 10y agoThe term 'static sites' is somewhat misused, its a spectrum that goes from static pages edited locally that get 1 page-view a month to the front-end code for large corporations which get millions of page-views a month. All of those fall under the modern usage of the term 'static sites'. As you move up that spectrum your static site suddenly needs to get built using a bunch of tooling, its dynamic in the sense that it interacts with many backend services via JS APIs, etc. If you have a single HTML page which you edit manually and enjoy uploading to S3 using Transmit then sure that's a legitimate workflow and I've used it for years before migrating all of my sites to Netlify. Once your front-end needs its own build process there's a huge benefit in utilizing a service like Netlify to run your builds for you. This also gets you into the workflow of using source-control for your front-end (you're either doing it already or editing HTML files locally) and its just so convenient when your commits trigger instant builds+deploys - one less thing to worry about. In fact Netlify's new Deploy Previews and Deploy Contexts which build+deploy as many of your branches as you'd like is enabling completely new workflows that are genuinely helping teams scale their capacity because they spend less time on the mechanics of everything. Like some have mentioned Netlify is like 9 tools built into one service taking care of you all along the way, and of course there's a free plan which beats GitLab/GitHub Pages every day of the week because that's what the company is set up to do, its not just a side feature they are maintaining. Netlify serves small personal blogs and main sites for billion dollar companies and spends its resources further developing tools to make developers and devops people's lives easier. So once you commit and Netlify builds it also does atomic cache invalidations, deploys to a CDN, offers integrated pre-rendering/form-handling, password protection, snippet injection and many more features to make life simpler. Can you do all these things manually on your computer or on a VPS? of course you can, but are we developers lazy and enjoy tooling and services that let us spend time coding as opposed to devops'ing what some have already commoditized? yep. If you prefer your own Git installation and don't see benefit in using Github/Gitlab/Bitbucket/etc then Netlify is likely not for you. Disclosure: I'm a Netlify investor and avid user.
- p4bl0 10y agoIf you need more than static hosting, there are quite good VPS that are very cheap. I regularly go to a blog which lists cheap VPSs called LowEndBox (you can easily find it using any web search engine, I don't want this comment to be an advertisement, even if the whole point of this thread seems to be exactly that). For instance I recently purchased small VPSs at $11/yr (yes, per year) with the following specs: 1 vCPU, 768MB ram, 15GB disk, 3GB monthly bandwidth, 1Gbps link, 1 IPv4, 30 IPv6 (and "DDoS protection" whatever that means). I use them for example to host various copies of my website (as a Tor Hidden Service (.onion), as a EepSite (.i2p), on IPFS, and on ZeroNet). I also have one that I only use as MX backup since I self-host my emails. None of this would be possible even on multiples $ per month static hosting offers, or even on AWS as some suggest here, and yet it costs me less than a dollar per month :).
- jlgaddis 10y agoGood luck, but those VPSs are usually offered by fly-by-night companies, massively oversubscribed, running OpenVZ, and the company probably won't even be around a year from now. There are decent providers on there but caveat emptor.
- p4bl0 10y agoThat may be a risk yes. But we'll see. For now the service is great and the support is quick to answer tickets :). What is so wrong with OpenVZ? (Which is indeed the technology at use.)