I have a website hosted at Amazon S3; the URL is something like www.foobar.com.s3-website-us-east-1.amazonaws.com
. I would like to set my domain registrar (NameCheap) to redirect both foobar.com
and www.foobar.com
to this website. Setting the record
www.foobar.com CNAME www.foobar.com.s3-website-us-east-1.amazonaws.com.
works fine for the www
subdomain. However, I can’t figure out how to configure the no-subdomain version of the site. I tried
foobar.com CNAME www.foobar.com.s3-website-us-east-1.amazonaws.com.
but that doesn’t seem to work. (And did I read somewhere that CNAMEs aren’t supposed to be used like this?) I know that the S3 bucket name is supposed to be identical to the fully-qualified DNS name, but does this really mean that I need to mirror my website contents in two different buckets? I feel like there must be a better solution than that.
Thanks!