Dongwon Lim
Dongwon Lim

Reputation: 11

I cannot send www.example.com to example.com in aws route53

I'm using route53, elb, ec2 in aws.
I have set example.com connected to elb.
It works fine.

Currenlty, I'm trying to connect www.example.com to example.com,
and I'm stuck.

I checked whether I can connect test.example.com to example.com,
and It worked. Either using CNAME or using s3 static website hosting
(redirection) worked.

But for www.example.com, these methods doesn't work,
and I'm not figuring out why.


Thank you for answering my question.
I'm updating the details.

I have set my domain example.com on Route53, and I can access to it. I also wanted it to be accessible with www.example.com, so I added a CNAME record www.example.com pointing to example.com. However, my browser failed to load www.example.com.

I tried another method, S3 static website hosting. I created a bucket named www.example.com, made it redirect to example.com, and got a s3 url. I added a CNAME record www.example.com pointing to the s3 url. Again, my browser failed to load www.example.com.

I changed my approach.
Instead of www, I decided to test test.example.com with the same methods that I tried, and it worked fine. My browser loaded test.example.com successfully.

When I tried to access test.example.com, it fails to load fast when it's not configured. On the other hand, with www.example.com, the browser displays loading message on the status bar for a long time, and shows white blank screen.

I want to make it work with www.example.com

Upvotes: 0

Views: 755

Answers (1)

pogul
pogul

Reputation: 458

You haven't said exactly what you've done to redirect between mydomain.com and www.mydomain.com so it's difficult to tell you why it isn't working.

I have my personal domain set up in this way, where the bucket mydomain.com is set up in S3 to "Redirect all requests to another host name" and that host name is www.mydomain.com (see the "static website hosting" section in the bucket properties).

I notice that in Route 53 I have A records set up for both mydomain.com and www.mydomain.com and in both cases I have aliases set up aliasing the target s3-website-eu-west-1.amazonaws.com. to a hosted zone ID. I don't remember doing that though!

Upvotes: 1

Related Questions