Recent AWS Customer Success Stories & Videos

More AWS Customer Success Stories...

« Even More Features for AWS GovCloud (US) | Main | AWS Weeks in Review - December 17 & 24, 2012 »

TrackBack

TrackBack URL for this entry:
http://www.typepad.com/services/trackback/6a00d8341c534853ef017d3ecd7984970c

Listed below are links to weblogs that reference Root Domain Website Hosting for Amazon S3:

Comments

Feed You can follow this conversation by subscribing to the comment feed for this post.

André Oppermann

Just be careful here with doing CNAMEs on root domains. Things like email will break because the MX records are no longer visible behind the CNAME. Gmail for example won't send emails to domains with a CNAME as root.

knockoutJs developer

I am just wondering how many people are hosting static website nowadays?

I would be very interested if you could host asp.net websites maybe?

Windows Azure requires www. for domains and it's just too expensive for simple websites with one small DB, much more expensive than my old hosting provider.

Steve

This is nice. Another welcome addition would be for S3 or CloudFront (or both) to support on the fly gzipping of content to further improve the performance of static web sites hosted on S3.

Paul Stamatiou

Nice work Jeff et al!

The main thing holding me back from hosting my site on S3 entirely is "multiviews" support -- loading myblog.com/new-blog-post instead of new-blog-post.html. I currently do that on my jekyll site wrapped in rack::rewrite on heroku with r301 %r{/(.*).html$}, '/$1'

I just glanced at the redirection docs -- doesn't look like I would be able to do this just yet?

Keith Brook

Although that's good news in itself, it does reduce the number of buckets available by 50%.

One for www and one for root.

Are there any plans, I wonder, for increasing the number of buckets to way beyond 100?

Keith

James Carpenter

And what happens when someone else has already created the bucket [www.]yourdomain.com???

gk

Great news! Any idea if/when redirect w/ keeping query string intact will be available?

Colm

André,

You're completely right about CNAMEs at the domain apex, they do tend to break MX and NS records. When this feature is used with Route 53 ALIAS records, no CNAME will be present - behind the scenes the ALIAS record links directly to the S3 "A" record data.

Colm
Amazon Web Services

Xing Quan

Keith,

Thanks for the feedback on increasing the 100 bucket limit on S3. We will take that feedback into consideration as we think about what to do next for our customers!

Xing
Amazon Web Services

Xing Quan

gk,

We already support redirection while keeping the query string intact. If you follow Jeff's example in the post, he is redirecting all requests for "mysite.com" to "www.mysite.com". By default, this includes the query string that follows "mysite.com". For example, if a request is made for "mysite.com/gk", then the redirect will go to "www.mysite.com/gk".

Hope that helps.

Xing
Amazon Web Services

Xing Quan

Paul,

Thanks for the feedback. This is something we will keep in mind for future enhancements to static website hosting on S3.

Xing
Amazon Web Services

Jay Freeman (saurik)

The "you only have 100 buckets" problem is even worse if you have multiple hostnames that access a website; as an example, I have a set of (as yet un-launched) sites {www.,}{cydia,mobile}{,-}substrate.{com,net,org}, all of which redirect to the canonical URL; even just hosting all of these zones on Route 53 is currently irritating, but at least that is billed in a way where I can feel confident I can keep adding arbitrarily many (although at a cost that seems high, given that they are all setup identically).

To note: this is a very common use case; {www.,}microsoft.{com,net,org,co,io} all redirect to www.microsoft.com (as well as probably other suffixes I didn't test); the "all suffixes, both with and without www" redirect is probably the /most/ common case, which means that you are looking at a bucket explosion of at least 6x, not 2x, all to just get a bunch of 301 redirects. Combine this with the "bucket namespace squatting" problem, and this seems like a mis-generalization of S3 for web hosting.

However, the pricing of this service is also rather high: the 301 redirects seem to be billed at WebsiteGetObject,Requests-Tier2, which I believe (but could be wrong) is the same price as a full S3 GET request, despite seeming like it should be much easier to implement. Maybe it would be possible to at least get bulk pricing discounts on S3 requests? The cost of an S3 request is one of the few things Amazon has never decreased the price of throughout the history in their core offerings.

So, I would love to use this service (I find hosting 301 redirects for tons of websites incredibly tedious), but the economics are still better on shared hardware (as the marginal cost of serving millions of 301 redirects off EC2 is nearly 0 if you have any other servers you can toss these requests at, even though ELB and tons of redundancy) and it is not clear that the administration difficulties will actually be easier (due to the bucket explosion and possible squatting).

Ben Hodgson

Great, thanks! I've been waiting for this feature for a while. It would be great if you could add this for CloudFront too.

Mikeschinkel

Hey guys this is great, but you are still missing one key, critical need. I need for you to 302 redirect on what would otherwise be 404 errors to a URL of my choosing with the not found URL passed as a query parameter. Doing that could really open up what we could do with this static sites. Please...

anon

Would be good to address the billing issue for redirects:

Reposting from https://news.ycombinator.com/item?id=4981645:

>> These 301 redirects seem to be billed as: "WebsiteGetObject,Requests-Tier2", which I believe is $0.01 per 10,000 (not including bandwidth, and with no decrease in price for large scale). I mean, its nice that its hosted in the cloud and all, but billing at the same rate as a much more complex S3 GET request (or "GetObject,Requests-Tier2") seems much too expensive (although I can imagine that if you have only a small number of requests; if you have any other server on which you can host the 301 redirect, you can do so with a marginal cost near 0, even at a load of many millions of redirects per day.

Casey Dexter

When I try to create a CNAME record and set the value to the S3 website endpoint for the first bucket, I get the following:
RRSet of type CNAME with DNS name mydomain.com. is not permitted at apex in zone mydomain.com.

Xing Quan

Casey,

The CNAME record can be set on a subdomain of your domain, such as "www.mydomain.com" or "home.mydomain.com". CNAME records cannot be set on the zone apex, which would be "mydomain.com". In Route 53, that's what the Alias record is for; it's also the step that Jeff is showing in step 3 in this blog post.

Xing,
Amazon Web Services

Xing Quan

Mikeschinkel,

You can set your own redirection rule to accomplish that type of redirection. In the console, try the following XML code for your redirection rule. This will 302 redirect all 404 errors to a hostname of your choosing and keep the query string intact.

http://media.amazonwebservices.com/blog/s3_redirect_example.xml

Sjehutch

can you set this up as a cookie-less domain for static content similar too http://cdn.sstatic.net/ also is on a cdn ?

Adam

So what happens when someone is "squatting" on a bucket name that matches _your_ domain name? It's already happened, see: http://threads2.scripting.com/2013/january/aFunnyThingHappened

Michael Mealling

(Hi Mike!)

I recently discovered that the redirect policies in the static website Routing Rules section is limited to 20 Routes. This is the only type of redirect that can handle URLs with query strings. So if I'm moving a Wordpress blog over and it had URLs of the form "host/?p=4" I could create a Route to redirect that to an Object. But you can only have 20 of those. I need about 420 of them. Anyone have any suggestions for how to deal with that?

Mike Schinkel

Hi @Xing Quan - Thanks much for the comments. That's perfect for my needs!

@Micahel Mealling Bummer, hope they can open it up for your.

Mike Schinkel

Hi Xing Quan,

Thanks so much for your answer. I am trying to do what you suggest but I keep getting "NoSuchKey".

Here's a Gist showing what I am trying:

- https://gist.github.com/4540606

Xing Quan

Michael Mealling,

Thanks for your feedback on increasing the rule limit for our redirection rules feature. For your use case, you can also consider using our object-level redirect feature. You can read more about it here: http://docs.aws.amazon.com/AmazonS3/latest/dev/how-to-page-redirect.html. You can also see Jeff's blog post on it: http://aws.typepad.com/aws/2012/10/amazon-s3-support-for-website-redirects.html

Using this method, there is no limit on the amount of redirects you can configure.

Xing,
Amazon Web Services

Luigi Montanez

I set this up successfully for a .com domain, but can't get it to work for a .io domain. Specifically, I get no host records when doing a query for it. Is there something incompatible about those .io domains?

The comments to this entry are closed.

Featured Events

The AWS Report


Brought to You By

Jeff Barr (@jeffbarr):



Jinesh Varia (@jinman):


Email Subscription

Enter your email address:

Delivered by FeedBurner

April 2014

Sun Mon Tue Wed Thu Fri Sat
    1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30