1
votes

I'm getting 400 Bad Request and "The specified bucket exists in another region. Please direct requests to the specified endpoint." when going to my domain: http://www.*.com/. I have the CNAME record on namecheap set to: .com.s3-website.us-east-2.amazonaws.com, which works fine when I type it in the browser. It seems like it's going to www..com.s3-website.us-east-2.amazonaws.com instead, (with the www added), because you get the same error if you type that into the address bar. I spoke with namecheap support, and he told me to change the CNAME host to @ and delete the url redirect record because "it might be that the configuration of your website requires bare domain name not WWW". That didn't work. I also have namecheaps private email and he mentioned "your Email Service won't work if you have CNAME for the Root Domain". He told me to contact AWS support (I dont have tech support plan) and tell them to "Please contact your Hosting provider to change records from their side from Root Domain to www" and "you should change CNAME mapping from Root Domain to the WWW."

So I'm stumped here. Can anyone help me here? Is there a way to do what he said and will it fix my problem? Thanks.

1

1 Answers

1
votes

This error means that you have configured the CNAME record in your DNS server to use the wrong S3 static web site endpoint.

Your CNAME is using us-east-2. In what region is the bucket located?

Go to the Amazon Console. In S3 bucket properties, click on static web site hosting. Copy the URL for your web site.

Go to your DNS Server. Go to the record for www. Make sure that the CNAME matches the static web site URL.

[EDIT after a series of comments]

If you create a bucket with the name www.hibachiandyou.com then the domain must exactly match the S3 bucket name. If you want to also have a the domain hibachiandyou.com, then you need another bucket with the exact same name. You cannot use DNS redirects to get from one to the other. Use any other convention and it will not work.

The domain apex (hibachiandyou.com) cannot be a CNAME. Amazon Route 53 supports using ALIAS records for the domain apex. I am not aware of any other DNS server that supports ALIAS records. Recommendation, move your DNS servers to Route 53.

You can use a redirect with S3 to redirect one static web site to another web site. Review section 2.3 in this link.

Setting up a Static Website Using a Custom Domain