Question:
I’ve set up many static sites on AWS/S3 with other domain registrars; however, google domains is giving me some issues.
Steps I’ve taken:
On S3/AWS:
- created bucket domainname.org
- enabled static website hosting by adding index.html
- uploaded index.html and related documents to bucket
- create bucket www.domainname.org to redirect to bucket domainname.org
created bucket policy for domainname.org as follows:{
“Version”: “2012-10-17”, “Statement”: [ { “Sid”: “AddPerm”,
“Effect”: “Allow”, “Principal”: “”, “Action”: [ “s3:GetObject” ],
“Resource”: [ “arn:aws:s3:::domainname.org/” ] } ]
}
On google domains side
- Created CNAME record with name www and data entry equal to the bucket’s endpoint “bucketname.com.s3-website-us-west-2.amazonaws.com”
- Set TTL to 60 so I can see changes.
- I can see the site at that endpoint but it is not redirecting/mapping to the domainmae.org as expected. Usually, this set-up would be enough with other registrars
What am I missing? How do you properly set up static site hosting on S3/AWS while using google domains ?
Thank you for your help !
Answer:
On the Google side, configure the CNAME record (www) to point to s3.amazonaws.com. (yes, the dot included) … like this:
… and wait a few minutes.
Make sure your S3 bucket is named: www.yourdomain.com