Behind every cloud is another cloud.
July 21, 2009 4:58 PM   Subscribe

How would I go about hosting a website (I have my own .com domain) on Amazon S3 (two files, one html and one css)? Is this even possible?
posted by nam3d to Computers & Internet (5 answers total) 2 users marked this as a favorite
 
It isn't possible in the way you're thinking.

S3 objects have URLs and can be configured to be publicly accessible. But in order to map http://yourdomain.com/foo.html to an S3 object's URL, you still need to have a web server somewhere, even if its only purpose is to rewrite URLs and not to serve files.

In other words: You can have S3 serve the actual files, but not field the HTTP requests for your domain directly.

You might want to check out Amazon's Cloudfront.
posted by qxntpqbbbqxl at 5:28 PM on July 21, 2009


You could set your nameserver to redirect to the s3 directory, I think, assuming that the s3 directory was publicly visible.

Namecheap can do this, don't know about other nameservers.

I had personally never encountered this until I had a recent client select nearlyfreespeech as their domain host...which straight up doesn't even do dns servers, you have to redirect to your crummy subdomain.
posted by TomMelee at 5:49 PM on July 21, 2009


Contrary to what qxntpqbbbqxl said, it is possible to serve HTTP requests using nothing but S3 and a DNS server. S3 allows virtual hosting, which means you can create an S3 bucket called www.whatever.com and alias the domain to www.whatever.com.s3.amazonaws.com. At that point, any requests to that domain will load the corresponding files from S3.

However... the catch is that S3 doesn't handle directory index requests, which means that anyone who types in the bare domain name will get an error instead of being redirected to index.html. As far as I know, there's no way to get around this, so in practice nobody hosts a site entirely on S3. Depending on the amount of traffic you expect, I would recommend using NearlyFreeSpeech.net or a similarly inexpensive hosting provider for small static pages, and using S3 for any large or heavily-used files such as images.

TomMelee: NFSN provides free DNS hosting, I've been using it for years on a domain I didn't even buy from them.
posted by teraflop at 6:57 PM on July 21, 2009


Yep. To pull files from S3 you need a full URL -- http://www.metafilter.com/index.html instead of http://www.metafilter.com.

Details on the rest here
posted by fightorflight at 7:43 PM on July 21, 2009


+1 teraflop - https://www.nearlyfreespeech.net/
posted by bbyboi at 10:15 AM on July 22, 2009


« Older Knock me out with some cheap sunglasses   |   How do I stop resenting my boyfriend? Newer »
This thread is closed to new comments.