cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Go to solution

Issue Setting up Static Website in S3 using a Custom Domain

Hello,

 

I have been attempting to set up a static website with a custom domain (purchased through GoDaddy) using S3 storage and Route 53 using the following guide:
https://docs.aws.amazon.com/AmazonS3/latest/dev/website-hosting-custom-domain-walkthrough.html

I have been receiving the error when trying to access the domain (example.net) Server IP Address Could Not Be Found.

The bucket, example.net, seems to be set up correctly. I have selected `Use this bucket to host a website` under bucket properties and set the correct bucket policy:

{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "PublicReadGetObject",
"Effect": "Allow",
"Principal": "*",
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::example.net/*"
}
]
}

 

I have also set up a bucket for the subdomain, www.example.net. This subdomain has been configured to `redirect requests` to the `target bucket` example.net. I have also added the above bucket policy to this bucket. The static website can be accessed through the given aws url: http://example.net.s3-website.us-east-2.amazonaws.com. http://www.example.net.s3-website.us-east-2.amazonaws.com, does not work however, and returns Server IP Address Could Not Be Found.

 

I created a Hosted Zone using Route 53 named `example.net.` NS records have been generated as:
ns-157.awsdns-19.com.
ns-1372.awsdns-43.org.
ns-1713.awsdns-22.co.uk.
ns-739.awsdns-28.net.

 

SOA record has been generated as:
ns-157.awsdns-19.com. awsdns-hostmaster.amazon.com. 1 7200 900 1209600 86400

 

And I have created an A record:
ALIAS s3-website.us-east-2.amazonaws.com.

 

The NS servers have also been configured on with my domain name provider (GoDaddy.com):
ns-157.awsdns-19.com
ns-1372.awsdns-43.org
ns-1713.awsdns-22.co.uk
ns-739.awsdns-28.net

 

I am currently stumped as to what the issue with my configuration could be. I believe I have followed the instructions provided by AWS correctly. An assistance in resolving this issue would be greatly appreciated.

1 REPLY 1
Solution

Re: Issue Setting up Static Website in S3 using a Custom Domain

Issue has been resolved. 

Was missing an A record pointing to the main domain.