I have one main domain basicdomain.com
;
About 100 domains's CNAME are pointing to that main domain.
domain1.com, domain2.com, ... domain100.com
All domains will show basicdomain.com contents.
I am using AWS S3 for assets storage and I set basicdomain.com
's CNAME to point to s3.amazonaws.com
.
So when I hit basicdomain.com/directory/filename.png
it is showing AWS S3 's image s3.amazonaws.com/directory/filename.png
.
And for other urls in basicdomain.com
, it worked well as normal.
Problem:
I want to see AWS S3 image when I hit domain1.com/directory/filename.png
. When I hit that, it shows 404 error.
Is there any solution for this? If It can be done without changing CNAMEs for 100 domains, that's what I want.
CNAMEs can be very tricky to use because AWS' setup is a bit different. The preferred way is to use aliases and A names. Change one of your domains to an A record and test if that works. Try not to use CNAMEs on AWS.