Reputation: 3
I have a website comprised of a few static pages hosted on an AWS S3 bucket. I added an A record that maps mysite.com
to the bucket's address (via an alias). I also want users to be able to access my site via www.mysite.com
, but when I add a CNAME mapping www.mysite.com.
to mysite.com
it does not work. What could I possibly be doing wrong?
Upvotes: 0
Views: 910
Reputation: 5825
The www.mysite.com
should be an A record pointing to a separate S3 bucket. If you want users to always go to your www
site then you'll put your site files in the www
bucket and setup your top-level domain bucket to redirect to www.mysite.com
.
Upvotes: 0
Reputation: 201048
The domain name has to match the bucket name. The fix is to create a second bucket with www.
in the name, point your www
CNAME to that, and configure that bucket to redirect to the other bucket that contains your website.
Upvotes: 1