Search code examples
amazon-web-servicesamazon-s3dnscnamebucket

Changing CNAME destination to an S3 bucket


I have an AWS S3 bucket named a.example.com which is hosting a static website.

Currently the CNAME DNS record for domain a.example.com points to a.example.com.s3-website.us-east-2.amazonaws.com.

Now I want to change the CNAME from a to b so that domain b.example.com should point to the same bucket, which will remain unchanged as a.example.com.s3-website.us-east-2.amazonaws.com.

  • Can I simply change the CNAME to make it work?
  • Does something else in AWS S3 Bucket Dashboard need changing too?

Thank you very much for your help.


Solution

  • You need to change only the CNAME from a to b so that domain b.example.com should point to the same bucket. You do not have any change in Amazon site, you only need to point your new hostname to the old bucket.