Hi,
We would like to CNAME
multiple domains to a single AWS S3 bucket to serve images, to do so I followed URL: https://stackoverflow.com/questions/11606086/how-do-i-map-multiple-domains-to-the-same-bucket-on-amazon-s3
.
I did the followings:
a. created S3 bucket i.e. mydomain.com
b. stored images in mydomain.com
c. configured CNAME
d. mydomain.com
CNAME mydomain.com.s3-website.ap-south-1.amazonaws.com
After performing steps from a - d when we open mydomain.com
it shows image content which is absolutely fine.
Now, as mentioned in the stackoverflow [1] (article brief description below)
e. created second bucket XYZ.mydomain.com
f. redirected it mydomain.com
g. created CNAME XYZ.mydomain.com
CNAME mydomain.com
After performing steps from e - g, when we open XYZ.mydomain.com
it actually redirect to mydomain.com
in place of domain name remain same as XYZ.mydomain.com
and serve images from mydomain.com
#[1] You can create a second empty S3 bucket for my-domain.com
and configure it to redirect to the domain mydomain.com
. Then just use the same DNS settings to point both to the Amazon S3 domain for the bucket with all your static HTML files
and redirected.
Could you please advise where we are going wrong…
Thank you,
DS