Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I remember reading somewhere that there was a serious pitfall to using Amazon S3 for hosting a static website. I forgot what it was though. To me, S3 seems like a perfect option. Super fast, super scalable, and pay as you go.

What are the negatives of using S3 to host a static website?

share|improve this question
add comment

2 Answers

I'm still shocked to read that people assume that Content Delivery Networks are expensive, most charge as little as 0.20c per a GB.

Serving static websites on CDN's is amazing - you get the performance of a dedicated server without actually paying for it, plus you have a server in all major regions around the world so effective its actually better than a dedicated server for speed and scalability.

There is a few major set backs when hosting on CDN's and these are:

NO PHP FILES

PHP Support (You'd need to use contact forms via AJAX to retieve a contact.php from else where, html methods suck - if you don't need a contact form then AWESOME! for things like comments you can use DISQUS which is Javascript.

CNAME ISSUE

Sadly most CDN's don't support non-www cname so you can't resolve the domain when someone forgets the www, not a major problem but there are ways around this. You setup a EC2 or shared hosting and you let it handle the non-www with a redirect. So whenever someone forgets the www it communicates with the server then redirects to the CDN correctly. Alternative method is that you pick a CDN which supports this - I believe limelight does but Amazon, and Rackspace do not. I've heard limelight hosting the DNS and making edits manually on their system, I've never done this myself so cant confirm they do or do not.

Content Updating

The other set back is that you need to purge the content or files that your editing, so say for example you make some additions to the index.html you'd need to either setup a short expire on the container or manually purge that file from the cache so it updates all over the world.

Summary

Hosting a static site on a CDN is fanstatic - I run a handful of static sites on CDN and they are fanstatic, I only use like 1-2GB on each site and I get bills for £0.24p for each site, which is cheaper than shared hosting, and gives you the proformance of a dedicated server. If your going to setup a small VPS other than a EC2 for the redirect any VPS that is 128mb will do it. You can get a cheap one for like $1 a month. Just Google 128mb VPS or VPS under $5 a month - theres hundreds of companies doing LOW SPEC VPS for peanuts which will do the trick.

share|improve this answer
    
Cloudflare doesn't have issues with non-www cname. Plus the free tier is not bad either –  elssar Jan 28 '13 at 1:52
add comment

It's actually a bit overpriced in terms of bandwidth. They also had, until very recently, an issue were you couldn't map both your @ and your www A record to your site (so you either had mydomain.com accessible, or www.mydomain.com accessible). This however was fixed in a very recent update.

Personally, I think they're a bit overpriced, and you are lacking a lot of nice features (redirects, htaccess, etc). S3 does work well for hosting large files and images though.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.