2
votes

I'm currently using a naked domain to A alias to Amazon's S3 web hosting service (new feature connection between Route53 and S3), but I'm having some trouble getting the www. to redirect/display the bucket. I've tried: Using CNAME for www. -> naked and *. -> naked (the normal way) Using CNAME Alias to the bucket Using CNAME Alias to the naked domain (in the same zone) Using A to alias to the bucket Using A to alias to the naked domain (in the same zone)

Every result is either a 404 or trying to find the bucket for www.mydomain.com, which obviously doesn't exist. I quite possibly could have been overanxious and stumbled across the right one but didn't wait long enough for it, but I've been doing this over the past few hours so I think it should have went through considering I keep clearing my DNS. The normal way of using the CNAME approach gave me the www.mydomain.com bucket error. Also I'm not quite sure exactly what this "Alias" thing is all about. What is the correct method?

1

1 Answers

4
votes

Did you use the instructions found on the Amazon Web Services Blog - Root Domain Website Hosting for Amazon S3?

BTW, you don't specifically need to be using Route53 to use naked domain redirects, some DNS registrars like GoDaddy even provide domain redirection to root domains.

And you can always use a service like wwwizer's free naked domain redirect, which will accomplish this very easily.

But if you still want to use the new capability for this built into AWS, read on.


I'll assume you already have a CNAME record in your site's Route53 hosted zone site similar to the following:

NAME                   TYPE    VALUE
www.mydomainname.com   CNAME   www.mydomainname.com.s3-website-us-east-1.amazonaws.com

And I'm also assuming that the record points to an endpoint for a bucket named www.mydomainname.com and is configured to serve a static site.

You also need to create another bucket that is mydomainname.com without the www, and configure the option "Redirect all requests to another hostname" to forward requests to your other bucket which contains your resources.

Now go back to your Route53 hosted zone, create an A Record, mark it as ALIAS, and a dropdown will appear that lets you choose the S3 endpoint for your naked domain's bucket.

I have this setup working on my own servers, so hopefully you shouldn't need any special steps.