0

I migrated domains from a service provider (ipage) to godaddy. The hosting has been setup on AWS S3. I have done such things before and they worked. However this time I'm hitting a redirect loop between www.mydomain.com and mydomain.com when I try to visit it via the browser.

Things I have done include:

1- Create and configure s3 bucket for mywebsite.com. The corresponding S3 url is X

2 - Create and configure s3 bucket for www.mywebsite.com and redirect it to bucket created in step 1 using S3 bucket properties.

3 - Add a CNAME record pointing www to X (from step 1).

4 - Add forwarding to the top level domain (mydomain.com) to direct to www.mydomain.com

nslookup www.mydomain.com

Server:         127.0.1.1                                                                                                                                     
Address:        127.0.1.1#53                                                                                                                                  

Non-authoritative answer:
www.mydomain.com        canonical name = mydomain.com.s3-website-ap-southeast-1.amazonaws.com.
mydomain.com.s3-website-ap-southeast-1.amazonaws.com    canonical name = s3-website-ap-southeast-1.amazonaws.com.
Name:   s3-website-ap-southeast-1.amazonaws.com
Address: 203.83.221.121



nslookup mydomain.com
Server:         127.0.1.1
Address:        127.0.1.1#53

Non-authoritative answer:
Name:   mydomain.com
Address: 184.168.221.8

1 Answers1

2

Your redirection design seems to contradict each other, insofar ...

2 - Create and configure s3 bucket for www.mywebsite.com and redirect it to bucket created in step 1 using S3 bucket properties.

... redirect anyone accessing the Amazon S3 bucket for www.mywebsite.com to mywebsite.com, whereas ...

4 - Add forwarding to the top level domain (mydomain.com) to direct to www.mydomain.com

... redirects anyone accessing the top level domain mywebsite.com to www.mywebsite.com

That should be easy to fix one way or the other, depending on what's the actual goal ;) - the Example: Setting Up a Static Website Using a Custom Domain provides a complete walkthrough for an Amazon S3 bucket based on Amazon Route 53 zone apex support via Alias Resource Record Sets.

Steffen Opel
  • 5,560
  • 35
  • 55
  • Thanks! I realized this just after asking this and just swapping the buckets fixed it. I did not realize the S3 forwarding would forward to the domain and not the bucket name. Somehow I imagined that forwarding in S3 was only between buckets and did not hit the DNS. – Pratik Mandrekar Jun 25 '14 at 06:55