Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

using google domains when hosting static site on aws s3

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:

  1. created bucket domainname.org
  2. enabled static website hosting by adding index.html
  3. uploaded index.html and related documents to bucket
  4. create bucket www.domainname.org to redirect to bucket domainname.org
  5. 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

  1. Created CNAME record with name www and data entry equal to the bucket's endpoint "rightsrequest.org.s3-website-us-west-2.amazonaws.com"
  2. 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 !

like image 846
frostini Avatar asked Feb 17 '17 08:02

frostini


People also ask

Can S3 host static website?

You can use Amazon S3 to host a static website. On a static website, individual webpages include static content. They might also contain client-side scripts. By contrast, a dynamic website relies on server-side processing, including server-side scripts, such as PHP, JSP, or ASP.NET.

How do I point my Google Domain to AWS load balancing?

Is there a way to configure the root of a Google Domain to point to an AWS Elastic Load Balancer simply and painlessly? create a hosted zone for the domain in aws route 53, it'll have a list of name servers. In google domains, point the nameservers to those servers. Then manage your dns in route 53.


1 Answers

Just add a CNAME record pointing to s3.amazonaws.com. (yes, the dot included) ... like this:

enter image description here

like image 63
Jorge Garcia Avatar answered Sep 21 '22 11:09

Jorge Garcia