kabeersvohra
kabeersvohra

Reputation: 1059

AWS S3 and route 53 not propagating

I purchased a domain on uniregistry (ka.beer) and I want to set it up to use S3 for hosting and using route 53 for the DNS.

Steps I have taken so far:

  1. Create hosted zone on route 53 with the name of the root domain (ka.beer)

  2. Taken the NS records generated from this zone and updated the NS records of the domain on uniregistry, verified that this is propagated correctly using whatismydns.net

  3. Created 2 buckets with names ka.beer and www.ka.beer in S3

  4. Set up the root bucket to be public using the bucket policy and uploaded a test index page

  5. Set up both buckets for static web hosting, with the www bucket to redirect to the main domain

  6. Created A records in route 53 for ka.beer and www.ka.beer as aliases with the alias target to be the S3 zone (s3-website.eu-west-2.amazonaws.com.)

Now what I want is when I visit www.ka.beer, for it to redirect to ka.beer and when I visit ka.beer for it to show the website uploaded to that S3 bucket and to keep the same domain name

What happens currently: www.ka.beer does not resolve and ka.beer redirects to ka.beer.s3-website.eu-west-2.amazonaws.com

Thanks

Upvotes: 0

Views: 2435

Answers (3)

kabeersvohra
kabeersvohra

Reputation: 1059

Very frustrating issue but it turns out that the nameserver records were cached on my router. Clearing local cache and using incognito did not solve the problem, I had to log in to my router and reset the cache on there and then it started resolving correctly.

Upvotes: 2

Anoop Kumar
Anoop Kumar

Reputation: 912

have a look on below steps.

  1. Login into aws console
  2. I am assuming you have set your project on your public ip of EC2.
  3. Go to the Route 53
  4. Under DNS management: Click on Hosted zone
  5. Create the new Hosted zone with specific domain(your domain)
  6. After successful creation of hosted zone you will see NS and SOA entries with your domain name
  7. Copy all the nameserver from here and update it under your domain DNS setting (Domain provider eg godaddy etc).

Note: Domain setting : You can visit here under your domain provider

  1. After updating nameserver in your domain provider. It can take time for updation.

  2. After that create A record under hosted zone under Route53 and assign the bucket or EC2 instance.

  3. After some time your domain with point to that instance

Upvotes: 0

mockora
mockora

Reputation: 106

It looks you were doing the AWS Example: https://docs.aws.amazon.com/AmazonS3/latest/dev/website-hosting-custom-domain-walkthrough.html

If that's the case, check your Route53 entries. The domain name should match the S3 bucket name.

ka.beer A http://ka.beer.s3-website-us-west-2.amazonaws.com

www.ka.beer A http://www.ka.beer.s3-website-us-west-2.amazonaws.com

Upvotes: 0

Related Questions