
Which service do you use to host static website? - punit2502
Firebase Hosting, Netlify, surge.sh, Github pages or some other service
======
jwilliams
I think I've tried everything. Firebase, Netlify, S3+Cloudfront,
Github+Cloudflare are the main contenders.

I benchmarked them myself and using
[https://www.webpagetest.org/](https://www.webpagetest.org/) in numerous
locales.

Netlify has the edge as their publishing model is slick. They know there has
been an update and can trigger the nodes automatically. My only complaint?
They have a soft bandwidth limit - I wish I could pay to lift it. I know they
won't enforce - it's there to stop abuse. But they can take my $. For the apex
(sans "www") domain, you need to let them manage DNS, which is backended by
NS1.

Firebase hosting is excellent. Really top class. But I found it to be a little
slower on the deploy side. If you think you may use some kind of backend
functionality, this is a smart option. Even with an A Record on the DNS they
were fast. I think Google's Anycast network must be top notch (no surprise,
really).

Github+Cloudflare was pretty good too. But the invalidation model was
something you needed to work with. Plus every now and then I'd hit a cold node
(I assume) and it was slower. Overall it was great, but just a nose behind and
not as easy to use. One area where they really were consistently ahead was
DNS.

So lots of good options. Reality is they are so close you're best going for
the option you're most comfortable with. For vanilla I love Netlify. For
anything JavaScript-y Firebase is great.

Edit: I was curious, so I checked on Netlify. I think they're hosted on Google
Cloud... Which would make sense.

~~~
bobfunk
At Netlify we're multi cloud - currently run our infrastructure across 7
different cloud providers and are constantly expanding.

------
tedmiston
Big fan of GitHub Pages + Cloudflare.

After you've set it up once, subsequent projects are effortless.

I've also experimented with injecting CircleCI into the mix to do custom build
steps outside of what's supported by GitHub Pages.

------
rwieruch
I use Hugo [0] as a static website generator. They have plenty of themes [1]
to choose from. You can still adjust it with basic knowledge in HTML/CSS.
Afterward you can chose where to host it. You can use Github Pages [2] for
free or pay for a service like DigitalOcean (starting with 5€ a month which
scales well) [3]. I wrote a technical cheatsheet [4] on how to setup your own
website with these ingredients.

\- [0] [https://gohugo.io/](https://gohugo.io/)

\- [1] [http://themes.gohugo.io/](http://themes.gohugo.io/)

\- [2] [https://pages.github.com/](https://pages.github.com/)

\- [3] [https://www.digitalocean.com/](https://www.digitalocean.com/)

\- [4] [https://www.robinwieruch.de/own-website-in-five-
days/](https://www.robinwieruch.de/own-website-in-five-days/)

------
dguo
Netlify. I used to use GitHub Pages + Cloudflare (for SSL on custom domains),
but deploy previews made me try out Netlify, and I've had a fantastic
experience with it.

------
cstrahan
S3 and Cloudfront, with recurring Lambda to update Let’s Encrypt TLS certs.

~~~
wilkystyle
FYI ACM certificates are free [0], and will be automatically rotated. I use
Hugo + S3 + CloudFront + ACM cert for SSL.

[0] [https://aws.amazon.com/certificate-
manager/faqs/#billing](https://aws.amazon.com/certificate-
manager/faqs/#billing)

~~~
cstrahan
Absolutely. I considered going that route, but went with Let’s Encrypt on
principle, rather than practicality.

------
samlewis
GitHub Pages with a static site generator and Travis CI is superb.

I have my blog [0] setup so that all I need to do in order to publish a new
article is add a markdown file to my GitHub pages source repo. Travis then
builds the html and pushes it back to the GitHub pages repo.

You can easily add files and edit markdown on the GitHub web interface so I
essentially use GitHub as a CRM. If you're interested, have a look at my
GitHub Pages repo [1] and Travis CI build config [2].

[0] [http://www.samlewis.me](http://www.samlewis.me) [1]
[https://github.com/samvrlewis/samvrlewis.github.io/tree/webs...](https://github.com/samvrlewis/samvrlewis.github.io/tree/website-
source) [2]
[https://github.com/samvrlewis/samvrlewis.github.io/blob/webs...](https://github.com/samvrlewis/samvrlewis.github.io/blob/website-
source/.travis.yml)

------
leon_sbt
Firebase here as well.

Why I like it:

-CLI makes it easy to use.

-Deploying to the internet is as easy as "firebase deploy"

-Comes with HTTPS for free and with zero config

-Automatmagically uses Firebase's CDN

-Can serve with your custom domain name

-Low cost (for my needs/traffic levels)

-(Mostly)Straightforward documentation/references

Pain point(s):

-Slightly fragmented documentation. This was only one instance, so I might be blowing it out of proportion. I wanted to have Clean URLs in my website, there was no mention of that capability in the Firebase docs -> "Customize hosting behavior".
    
    
        But the only instance I found this feature was from a random Firebase blog post from 2 years ago. 
    
        https://firebase.googleblog.com/2015/12/a-host-of improvements_61.html
    

-I can't view the contents of what I'm hosting from the web based (At least I tried to, and can't figure it out.)

-Deploys can be slow(30 secs -2 min), but honestly I should setup a CD pipeline and stop staring at it while it's deploying.

I originally was going to use Google Cloud Storage, but they don't support
HTTPS out of the box.

------
Tomte
Nearlyfreespeech is superb.

Now I'm using Uberspace, and they are excellent, as well.

~~~
neilsimp1
Seconding nearlyfreespeech.net for simple php sites, but for static I'd say
either that or Github Pages.

------
quickthrower2
Google Cloud Storage

I quite like that it comes with command line util so it's easy to sync up
changes with one command.

It's also dirt cheap if you have modest traffic. I doubt I'll spend anything
significant. Maybe a few cents?

As an aside: I am changing my opinion on static site generators.

They make things harder because you need to learn the generator syntax. The
programming constructs in Hugo for example are woefully inadequate for
anything serious. For example you can't parse a date as far as I can tell.

My solution for the next static project is to use the web framework I am used
to (in my case ASP.NET MVC) and knock it up in that. I can use output caching
and read from resource files to get the static site performance and not deal
with a DB.

When I need to customize I will save a lot of time and frustration as I can
just do what I need to do from experience.

~~~
TheWiseOne
> My solution for the next static project is to use the web framework I am
> used to (in my case ASP.NET MVC) and knock it up in that. I can use output
> caching and read from resource files to get the static site performance and
> not deal with a DB.

Look into Wyam ([https://wyam.io/](https://wyam.io/)) a bit. You might find
it's extensibility to write custom modules similar to what you are trying to
accomplish.

------
luxuryballs
I’d like to add to the question a further question: which one would be best in
the situation where I want to regenerate the static page programmatically? So
basically something running on a server somewhere will run periodically
(probably on a trigger) and deploy a new copy of the static page to the
proposed host. So the question is which host has the best platform for that
kind of rapid deployment? Hoping not to use FTP for example.

~~~
benaiah
(disclaimer: Netlify employee)

Netlify supports running a build script automatically whenever you push to one
of our supported Git providers (we also have a CLI tool for those who prefer
to do that manually). This includes creating deploy previews for branches
other than your main deploy branch (such as PRs).

This is actually how the project I work on, Netlify CMS[0] works - the CMS is
a completely open source, front-end application that pushes to GitHub using
their REST API. If you’re using Netlify‘s continuous deployment, GitHub’s
webhook system notifies Netlify of the push and Netlify’s buildbot builds and
deploys the update to your site automatically.

[0]: [https://netlifycms.org](https://netlifycms.org)

~~~
woutr_be
Since you're here, I would like to take this opportunity to ask a quick
question. My Jekyll site is already running on Netlify, but instead of
manually creating files, I used Google Sheets and a simple NodeJS script to
sync everything. Would it be possible to run this NodeJS script on Netlify CD
and push to git and then let Netlify build my Jekyll site? (The script
basically pulls a Google Sheet, creates markdown files and download and
resizes some images)

~~~
benaiah
Netlify continuous deployment is triggered by a Git commit, but you can run
arbitrary Node scripts (though not _just_ Node scripts, of course) as part of
your build process. I don't know of a way you could trigger deploys based on
changes to the Google Sheets app without some code on your end (maybe IFTTT
could work?), but everything else should be feasible if I'm understanding you
correctly.

~~~
woutr_be
That's what I thought, I'll probably need another step somewhere that triggers
the syncing and then pushes to git. After that Netlify CD would do the rest.
Thanks.

~~~
bobfunk
I've setup that flow by adding a custom script in the google doc that triggers
a Netlify build hook. You can tie custom scripts to an image (so you can make
it a publish button).

------
0x54MUR41
I use Jekyll [1] for static website and GitLab Pages [2] to host it. GitLab
Pages supports not only Jekyll but also other static site engines. You can
also use custom domain and SSL for your site.

[1]: [https://jekyllrb.com/](https://jekyllrb.com/)

[2]:
[https://about.gitlab.com/features/pages/](https://about.gitlab.com/features/pages/)

------
pmontra
My own VPS on OVH. I stuff several other services in there. They get as low as
2.99 Euro per month. Probably pure hosting is much cheaper though.

------
Sreyanth
S3 + Cloudfront seems to be a popular choice.

------
sotojuan
GitLab pages but for no particular reason... I use Hugo and want HTTPS on a
custom domain so that seemed to be an easy way to do it. Only problem is that
GitLab does not redirect to the HTTPS version automatically.

I might try Netlify some day if it's as easy as GitLab + has custom HTTPS
domains for free.

~~~
sytse
We're trying to do the https redirect in [https://gitlab.com/gitlab-
org/gitlab-ce/issues/28857](https://gitlab.com/gitlab-org/gitlab-
ce/issues/28857)

------
srinivasang87
I am looking for a proper answer to this myself.

But.. If for something real simple (if you are ok with an ugly URL), I have
tried Google drive (with a public folder) and Blogspot with some quick and
dirty JS in the mix.

------
foxhop
nginx at my house.

nginx on a $5/mo virtual private server (vultr, linode, digitalocean)

nginx is incredible at serving static content. Also a CDN is often overkill
for the majority of websites. If you have never setup a web server before, its
worth taking a couple hours (or as much time as you need) to learn. It's a
very empowering experience!

for comments I'm building a service called Remarkbox
([https://www.remarkbox.com](https://www.remarkbox.com)) - its live on about
15 sites right now and growing.

------
dhruvkar
Netlify

Mostly for the simple SSL setup.

~~~
RepressedEmu
Same! Struggled with github pages at one point but Netlify really just made it
a two command process to get a site up with SSL. I love it!

------
unlikelymordant
Im using neocities, it seems good so far. I'm paying 5$ per month so i can use
my own domain.

------
du_bing
Alibaba OSS + ECS, along with Nanoc, a static site generator, this is the best
choice in China.

------
woutr_be
I used to do Google Storage + Cloudflare before.

Switched to Netlify for a couple of projects and loving it.

------
DrJid
I use Firebase Hosting, it's pretty simple, but I also use other Firebase
Services.

------
fuzzygroup
Github pages with Jekyll brought me back into blogging after a decade long
hiatus.

------
potta_coffee
I really like surge.sh. It's become my default for this type of thing.

------
wirddin
Github Pages + CloudFlare for the SSL in case of custom domain.

------
yellowapple
S3 does the job wonderfully for one-off projects.

------
vbsteven
VPS with nginx and cloudflare in front of it

------
gka
keybase.pub! [https://keybase.pub/](https://keybase.pub/)

------
subsidd
Digital Ocean.

~~~
eat_veggies
Seems like overkill for just a static site. I'd rather upload my assets
somewhere and have it served out of the box than configuring and securing a
web server for arguably negligible benefit.

~~~
stephenr
Making your site reliant on multiple other companies' services (eg s3 relies
on a heap of other aws services and can go down if those dependencies are
down) just to host some static files seems overkill to me, when a single
server you control can do it for you with minimal setup.

------
jasminz
one.com

