1

I have a domain: example.com.

I've created an A record for www.example.com with an alias targeting the load balancer’s DNS; this works just fine for www.example.com.

Now, I want to redirect all requests to example.com to www.example.com (note the www. prefix).

So I created an S3 bucket named example.com with a redirection to www.example.com, and an A record for example.com with an alias targeting the S3 bucket named example.com I just created. The idea here is to make all requests to example.com go to my S3 bucket and then get redirected to www.example.com.

But when I go to example.com, the browser just keeps loading forever. No redirection seems to be happening.

All I want is to redirect requests to example.com to www.example.com. How can I make this work? Why is my browser loading forever and not giving any error message?

TRiG
  • 1,167
  • 2
  • 13
  • 30
danielrvt
  • 239
  • 5
  • 13
  • Answered here: https://serverfault.com/questions/576461/redirect-non-www-requests-to-www-on-amazon-route-53 (Not enough rep to mark as duplicate) – Ron Trunk Jan 18 '19 at 14:23
  • I followed that exact same procedure, but I don't get the redirection working. I mean, if I go to my static site bucket's address, the redirection works fine, but when I use the A record alias feature, the browser keeps loading forever, no response. – danielrvt Jan 18 '19 at 15:21

0 Answers0