I'm currently trying to set up a small static website with my domain from NameCheap using AWS S3, but I'm having trouble correctly pointing requests to the corresponding S3 bucket.

These are my configurations for the services I use:


CNAME         www  example.com.s3-website-ap-northeast-1.amazonaws.com.
URL Redirect  @    http://www.example.com/


Static Hosting example.com.s3-website-ap-northeast-1.amazonaws.com.

I am fairly new to web hosting/domain stuff so please bear with me, but from what I understand from my registrar configuration is: users entering the naked domain example.com are redirected to www.example.com which then points to the AWS S3 bucket. Then the CNAME record then points to the corresponding AWS bucket.

Howeverwhen I try to visit www.example.com I somehow get pointed to the www.example.com bucket instead of the example.com bucket landing me to the AWS Bucket not found page.

Extra Details

  1. I've checked with DNS Checker that www.example.com's CNAME record indeed points to example.com.s3-website-ap-northeast-1.amazonaws.com..

  2. I've also tried making a www.example.com bucket then redirecting it to example.com but it seems it points to the actual domain instead of the bucket therefore causing a redirect loop. example.com->www.example.com->www.example.com (Bucket)->example.com->∞


Your bucket name must exactly match the hostname pointing to it in DNS. Create a bucket called www.example.com and point your www record to it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.