Route53 domain not connecting to cloudfront distribution with static site

0

Problem I have a nextjs static site I am hosting on S3 and serving with cloudfront. I have already validated that the website works fine with the cloudfront url. The problem arises when trying to connect it to my domain I have registered in route53. If it makes a difference, I originally created the domain with bluehost and then transfered over to aws.

tests

current configuration

Cloudfront

  • alternate domains set as www.<my-domain>.com and <my-domain>.com
  • custom ssl cert is set as the same ACM cert I created and validated
  • ipv6 is on

Route53 hosted zone

  • A alias record for www.<my-domain>.com -> cloudfront dist
  • AAAA alias record for www.<my-domain>.com -> cloudfront dist
  • A alias record for <my-domain>.com -> cloudfront dist
  • AAAA alias record for <my-domain>.com -> cloudfront dist
  • NS record is the original

Route53 registered domains

  • Domain status code
    • clientDeleteProhibited
    • clientTransferProhibited
    • clientUpdateProhibited

ACM

  • cert requested and email validated successfully
  • domains are <my-domain>.com and *.<my-domain>.com
  • associated resources shows my cloudfront dist
  • status is "Issued"

Is there anything I am missing that is causing the dns to not resolve? Let me know if I need to provide more info.

  • dig NS <my-domain>.com or www.<my-domain>.com returns SERVFAIL instead of the nameservers
  • going to the domain in the browser gives ERR_NAME_NOT_RESOLVED instead of website
  • updating the NS record in route53 to match the registered domain did not resolve dns
  • updating the name servers list in route53 registered domains to match hosted zone's name servers (shows status "failed")
1 Answer
1
Accepted Answer

Does the GLUE record for your domain point to the Route53 name servers or old NS Servers? If not, they will need updating.

You can find the NS records for your domain in route53 and ensure you update the DNS Records via your registrar https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/domain-name-servers-glue-records.html

profile picture
EXPERT
answered 10 months ago
profile picture
EXPERT
reviewed 7 months ago
profile picture
EXPERT
reviewed 10 months ago
  • I ran the command aws route53domains get-domain-detail --region us-east-1 --domain-name <my-domain>.com and got back the expected aws name servers. It also shows there are no Glue IPs.

    The NS record in the hosted zone doesn't show the same name servers as the registered domains page in the console, but I've been told that is normal and to keep what the hosted zone generates. Do you think the issue is something related to it being a transferred domain? AWS is my registrar and I have tried changing the name servers to match the hosted zone, but I they end up failing when I change away from the original values. My DNS lookup tests say there are no NS records for my domain

  • No that’s not normal! You said you recreated the route53 zone. Because you did you have ended up with different name servers. You have to update the glue records to match the name servers in the route53 zone

  • When you carry out a whois lookup for your domain is the registrar aws and then name severs match the ones in your zone?

  • Thanks so much! I got it to work. Didn't realize you have to use the same name servers under the registrar and the NS records

  • Your welcome. Yeah this is how dns works on the internet. Glad it’s resolved.

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions