
Ask HN: Where to host a static website (with SSL) - jakobegger
I&#x27;m currently hosting my static website on a VM. I&#x27;d like to avoid being personally responsible for keeping the system secure, so I&#x27;m looking for a service that will host my static website; ideally on a CDN. Here are my requirements:<p>1) Content must be transmitted via https end-to-end.<p>2) Content must be served from custom domain<p>3) Support for directory indexes (show contents of index.html when an URL with trailing slash is accessed)<p>I thought this would be easy, but all services I&#x27;ve found seem to have some kind of drawback.<p>Amazon S3 + Cloudfront:
If I use Cloudfront with S3 buckets directly, there is no support for directory indexes. If I use Cloudfront with S3 website endpoints, the content is transferred only via http between S3 and cloudfront edge servers.<p>Rackspace cloudfiles: 
If I understand their docs correctly, they don&#x27;t support custom domains with SSL<p>DreamObjects + DreamSpeed: 
Apparently doesn&#x27;t support apex domains, and also doesn&#x27;t support custom domains with SSL<p>Anybody know any other options?<p>Does this mean I need to continue to run my own VM just to serve a static website over SSL?
======
hashtree
GitHub pages + CloudFront (with SNI) does all three. It costs ~$2 a month and
you can deploy via Git. It's lovely.

Example links:

CloudFront: [https://rockymadden.com](https://rockymadden.com)

GitHub pages: [https://rockymadden.github.io](https://rockymadden.github.io)

Compilation repo:
[https://github.com/rockymadden/rockymadden.github.io](https://github.com/rockymadden/rockymadden.github.io)

Source repo: [https://github.com/rockymadden/rockymadden-
web](https://github.com/rockymadden/rockymadden-web)

~~~
atian
Hmm, does it cost you $2 a month for bandwidth? I had the impression that
CloudFront with SNI costs money but after looking it up it's free.

------
andymurd
I think you can specify index documents in your S3 bucket config and
Cloudfront will use them. A good write up:
[http://www.michaelgallego.fr/blog/2013/08/27/static-
website-...](http://www.michaelgallego.fr/blog/2013/08/27/static-website-
on-s3-cloudfront-and-route-53-the-right-way/)

I am unsure about end-to-end encryption for transfer to the edge nodes or
encryption at rest. Maybe someone with a better understanding of Cloudfront
and IAM can help out.

------
dbond
Two options I'd go with:

1\. Use a static site generator to build the site, ensuring I have indexes
available, piggyback s3's SSL as a custom endpoint through to cloudfront and
use SNI for my custom domain.

2\. Use Heroku (or similar provider to remove most of the maintenance burden),
piggyback their SSL to cloudfront+SNI+csutom domain.

------
califield
I would set up a free Heroku application and provide SSL and caching by
redirecting it through CloudFlare.

I host a lot of static websites like this.

------
stevejalim
Why not just serve from S3 over HTTPS?

