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?