How to redirect www to non www in Amazon Route53?

1k Views Asked by At

I have a domain name lets says it is domain.com. I have created an EC2 instance with a LEMP stack to host the website. The domain name is registered at godaddy. I have created a hosted zone and also created a record set with my elastic IP. The thing is website is accessible if I type domain.com, but when I add www to it doesn't work. If url is www.domain.com it gives an error. I am unable to find a way to do this. I would be highly grateful if anyone can help me in solving this problem.

1

There are 1 best solutions below

0
On

when you moved the domain to a different server,the dns will need to be updated to the new value. this is a caching issue, wait a few hours for the cache to expire and then your new ip will be retrieved.