Settings

Theme

Ask HN: Best place to host a static website with SSL and CDN?

39 points by Im_a_throw_away 9 years ago · 32 comments · 1 min read


Hi HN!

I'm building a static website in HTML/JS, and I'm wondering what's the best place to host it online. I'm especially concerned about getting a good SEO.

Here's what I'm looking for:

1. A custom domain with ssl, for an httpS url.

2. A CDN, for super fast loading.

3. Be able to create 301 redirects with something similar to an htaccess. So it seems GitHub page are not an option.

4. Something simple to use, because I don't want to lose time learning/configuring stuff. So the Amazon combo S3+route53+cloudfront won't be possible for me.

5. And not expensive, less than $10 per month.

Any idea? Thanks!

dflock 9 years ago

A small static site on S3 with the free cloudflare plan in front will cost you ~$0.50 per month, with moderate traffic. Probably less than fifty cents, especially to start with, if your traffic is low.

They support all the requested features.

Yes, hosting this on S3, with either cloudfront or cloudflare, does take some (one time) setup.

The payoff is that you don't have to rent and deal with a server and ongoing costs are very very low.

Kalium 9 years ago

> 4. Something simple to use, because I don't want to lose time learning/configuring stuff. So the Amazon combo S3+route53+cloudfront won't be possible for me.

"learning/configuring stuff" isn't time lost. It's the price you pay to get a lot of functionality for a minimal financial cost. None of these items are complex, costly, time-consuming, or poorly documented. You're worried about at most a dozen hours of time once.

If you're not willing to learn to do things for yourself, you're going to be paying someone else to do it. At which point you're either blowing your budget or compromising on your needs.

The answer to your needs is acquiring the skills you need in order to do it all for under $10/mo.

  • cauterized 9 years ago

    Setting up a server has a sufficient learning curve to significantly delay a project launch for someone who's new to the task.

    Configuring such a server to be performant and secure, and keeping the kernel and all relevant packages patched is another learning curve. It's also a major time-sink for a small or one-person team, and even more impactful if this is a side project.

    A full server is also totally unnecessary if all you're serving is a static site.

    Is all that stuff worth learning? Probably. If you're a technologist. If you're interested in web development rather than trying to advertise your mobile apps. Or if your time has no value.

    But if you're just trying to get a static site hosted as quickly and inexpensively as possible, a $5/mo cPanel shared hosting account plus something like Cloudflare may be a MUCH better use of your time and resources.

    • Kalium 9 years ago

      You're right! For sophisticated needs like running a server, it's not reasonable to expect a random nontechnical person to take on all that education.

      This person clearly knows enough to be aware that they have good options for hosting a static site without ever having to admin a server. Frankly the simple S3+CloudFront+Route53 setup can be done in an hour or less following lots of clearly written documents that don't require one to be a seasoned sysadmin. And it'll cost less than $2/mo.

ne01 9 years ago

At https://www.sunsed.com we are working on a solution exactly as you described! Not ready yet! I just want to see what you think about it in your case.

In version 3 (currently under development) you'll have a server.htmlpp to custom route your traffic and a file manager to treat your website content as static files.

You'll be able to import/export from any static website generators. Also edit online and use a command line to push/pull changes so you can edit from your computer.

Please contact me if it's interesting to you!

By the way checkout https://htmlpp.sunsed.com for information about our HTML++ language, you might find it interesting!

Also checkout my explanation of how v3 works: http://seyedi.org/my-cms-idea

ETA for v3 is January 2017.

Edit: Made the URLs clickable.

nickthemagicman 9 years ago

How is Openshift now mentioned here? You have all that stuff you asked for plus insane amount of additional stuff plus the bronze plan is free!

Its a hobbyests dream!

I love openshift from what Ive been using it for so far.

seanwilson 9 years ago

Netlify seems like an easy choice as it does everything you ask for and is $9 a month if the free version isn't enough. It couldn't really be much easier to deploy with it (push via Git or drag and drop in the browser).

For what it's worth, you can do redirects on GitHub Pages with HTML redirects: https://help.github.com/articles/redirects-on-github-pages/

I'm with you on avoiding AWS for static sites as there are much easier options like the above.

detaro 9 years ago

maybe https://www.netlify.com?

kennycox 9 years ago

If you are looking for cheapest and best options to host your website, then you should choose http://www.web.com/landing/hosting50 - 0.50/month.

As we talk about SSL certificate for cheap price, you can choose https://www.ssl2buy.com where you will get free installation support.

For CDN, https://www.cloudflare.com/ is the best option. You can go with free plan as well paid plans to enable more features.

AaronSmith 9 years ago

There are cheap and best web hosting plans available in your budget and requirement here: http://b2evolution.net/web-hosting/budget-web-hosting-low-co... and you can install SSL certificate to secure your domain at cheapest price here: https://www.cheapsslshop.com/comodo-positive-ssl, which will cost you $4.95 per year.

marktangotango 9 years ago

No CDN or 301, but our service [1] offers file hosting, custom domains, https via Lets Encrypt certs. We also offer API creation with what we call "API Queries" (SQL queries executed via POST requests). You can post forms with captcha. We built our service to be very simple to use, just upload your html, css, javascript, and assets.

Just curious about the 301 requirement, what is your use case for this? Ie wondering if this is something we should consider supporting.

[1] https://www.lite-engine.com

tylercubell 9 years ago

GitHub Pages and Cloudflare.

  • domenukk 9 years ago

    Simple, free and effective. The traffic between those two is not encrypted however for a static page this should not matter at all.

  • Im_a_throw_awayOP 9 years ago

    GitHub Pages already have a CDN, so why add cloudflare?

    And as mentioned in my post, Github doesn't let you have some kind of htaccess, so no 301 redirect are possible. And I need that feature.

VertexRed 9 years ago

For $10 per month I'd say your best bet would be shared hosting (or a VPS at best) together with Cloudflare's free plan (for the SSL and CDN).

mmosta 9 years ago

AFAIK there are no static host services that offer user defined response codes, you'll most likely have to prepare your own.

csallen 9 years ago

Let me add my voice to the chorus of people championing Netlify. When HN took down my website https://IndieHackers.com a few months ago (primarily due to a config error on my end), I was able to move the site over to Netlify and have it up and running in minutes.

stevenhubertron 9 years ago

I use Netlify to host a number of sites that get 40k visits a month for $9 a month. It's been a great service.

asteadman 9 years ago

I use s3+cloudfront (route53 not strictly necessary, almost any dns host will do). Honestly, its a one-time config and after that its very simple. Cost would be well under $10 unless you've got crazy traffic (Problems I wish I had...)

jgowans 9 years ago

You might be interested in checking out Aerobatic. https://www.aerobatic.com

disclaimer: I work at Aerobatic

arikr 9 years ago

Surprised no-one has suggested this: Firebase. Free, incl SSL. Not sure about CDN, but you could use Cloudflare for that.

ThatGeoGuy 9 years ago

> 1. A custom domain with ssl, for an httpS url.

This is pretty straightforward as long as you're setting up any VPS or have access to the server itself. If you wanted something like SquareSpace or Github Pages, this is much more difficult.

> 2. A CDN, for super fast loading.

I honestly have no idea what this means. A CDN can help if you have a large website over multiple data-centres, but really seems to be overshooting what you are trying to do here. Are you just thinking Cloudflare? What's the reason for this? You're hosting a static website, it's not like you've got to send massive amounts of data over the wire, so I can't see how having some large CDN backing you is going to provide much if anything at all. You should maybe specify what you really want here, since it sounds like you're worried your site won't be mirrored and may have downtime or might be slow in some countries, but instead you're phrasing it as if a CDN is a requirement. Why is a CDN a requirement?

> 3. Be able to create 301 redirects with something similar to an htaccess. So it seems GitHub page are not an option.

As long as you set up nginx / apache yourself, I don't see why this is hard to come by. Any VPS service would work for this.

> 4. Something simple to use, because I don't want to lose time learning/configuring stuff. So the Amazon combo S3+route53+cloudfront won't be possible for me.

Indeed, something "simple-to-use". Perhaps this goes back to "simple is not easy", and it sounds like you want easy based on everything so far.

> 5. And not expensive, less than $10 per month.

This seems to be the part that I don't quite get. How are you supposed to use a CDN for a service that has running costs of $10 / month? I mean, that could be the cost of one server. Take DigitalOcean for example (I don't work for them, but am a customer). You could pay $5 a month for a small VPS, with very little storage (20GiB). This would allow you to host your website, with your own domain, with LetsEncrypt certificates for TLS. You wouldn't have any CDN backing you, but you could set the whole thing up just as you would any other server, and if you know what you're trying to do you could even do the whole setup on a Docker container and just deploy the whole thing through their API.

That said, keep in mind if you want the total cost under $10 / month you're probably not gonna make it. Your domain could be anywhere between $25 - $40 a year (assuming it's cheap), which means that monthly you'll probably be paying about $8-$9 a month just for the VPS service and your domain. Any cost on top of this (excluding time, which will be the major investment at first) will pretty much put you over your limit. Also, if you end up deciding that the $5 DigitalOcean plan doesn't provide good enough specs / limits, then you'll be shifting to the $10 and $20 per month plans which will definitely put you over budget here. Another VPS provider, http://edis.at, that I've heard good things from provide some differing plans based one what you're looking for, but total overall cost is pretty similar.

There's lots of information about stuff like DigitalOcean online, but I fear that I don't understand your needs in depth enough to just recommend getting a VPS and going for it. It seems like the best path to take for a static site, but the remarks about CDNs and such seem to make me wary pushing that advice.

  • Im_a_throw_awayOP 9 years ago

    Thanks for the detailed answer! Here are some comments to answer your questions:

    > 2. A CDN, for super fast loading.

    I just want my website to load fast from anywhere in the world. I especially want this since page load time impact SEO. Something like cloudflare.com which has a free plan.

    > 5. And not expensive, less than $10 per month.

    $10 per month excluding the domain name. I don't think that's unresonable for a simple static html website. As mentioned above there are some CDN that have a free tier.

    Overall I'm trying to find the simplest way to host my static website online, and make sure it works well with search engine (ssl and fast to load). All of that for less than $10 per month.

  • ge96 9 years ago

    I rent from OVH it's like $3.99/mo or maybe $2.99/mo for a 10GB vps. Great speed too. They are one of thr largest server providers. You have full access too, so you do have to learn to setup virtual host / enable SSL, etc...

    Also a domain can be as cheap as $0.99 for first year from GoDaddh but SSL is at least $9.00 from name cheap but you could get one of those let's encrypt Sal's but you have to update it every 90 days I hear.

J0rdanVa1dez 9 years ago

> 1. Custom domain with hosting. You don't neet Https and SSL.

> 2. A CDN, for super fast loading.

> 6. oryginal content on your pages.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection