Hosting: Amazon S3 vs GitHub gh-pages vs?

I have a couple of low-traffic sites ported to Hugo. They currently run from a gh-pages branch on GitHub.

Lots of things to love about this setup, deployment is a button pushed.

The only downside I found, which isn’t a big downside for me, is the fixed 10 minute cache timeout on static resources.

I could get better control with this on Amazon, but are there other reasons? It’s not about the money for me, I would be happy to chip out some money to Amazon if they could add some value.

Can’t give any pros and cons, but I’m using S3 to host a bunch of static sites, and it’s working beautifully. The only thing I can think of is that it might be a requirement to also use Route 53 (Amazon DNS) for you domain since you can’t use CNAME on your naked domain. It’s a really good service as well though.

Thanks for the input.

I’m going with Amazon for three reasons:

  1. GitHub insists on doing a 302 redirect for all other setups than a CNAME, and my current providers do not support that on the “naked domain”. This is a SEO bugger.
  2. GitHub defaults the cache timeout for static files to 10 minutes, which may be fine for most people, but annoying when I have set up scripts that fingerprints my statics.
  3. My domain names / hostings are a little too spread out at the moment. Might as well put it all in the place where I buy my shoes.

My domain name transfers are in progress, but I must say setting up S3 and deployment to it was easy. Three lines in a Gulp file (and some more, but still easy).

This is right, see RFC1034 section 3.6.2 for details.

Are you deploying on a single zone? Are you using the CDN?

No CDN (currently).

I have now ported two sites to Amazon.

I’ve posted this in another thread, but for completeness, the aws-publish Gulp task in the file below shows one way to set suitable cache values for static content on S3.

1 Like

Thanks a lot :slight_smile:


I want to go the gh-pages route for now and use a custom domain. I presently have a WordPress install on a hosting service, but have created a Hugo website that is being hosted on Github. I have also already created the gh-pages branch for it. Since I haven’t yet removed the WordPress install, that is what is showing up on gh-pages at the moment. In order for my Hugo site to replace it, what do I need to do? As I mentioned, the custom domain is an active one. I have not gotten any definitive working answer from my hosting service (for obvious reasons), and no responses on the thread I created here. I also haven’t gotten any responsve from Github support. This is my first time doing this. So I thought I would give it a try here, since the topic is somewhat related. Thanks in advance for any feedback. Much appreciated!

You have created a thread about your issue. Adding that same question to multiple threads isn’t getting you anywhere closer to a solution. It just adds noise.

@bep I am trying to get rid of my original thread since it doesn’t seem to be getting me anywhere. Not trying to create noise. Just trying to get an answer which no one seems to be able to provide yet. But I can’t seem to be able to delete it. I guess I will just try and get my answer elsewhere. Thanks anyway!