1

I have a domain name configured into GoDaddy domain provider. I created Angular application accessible using this cloudfront internal web address: xxxxxxxxx.cloudfront.net

The question is how to configure the domain to redirect properly web requests to this address hosted on AWS. I contacted the GoDaddy support and they gave these instructions:

In order to make changes we need the nameservers and the nameservers will be provided by the host that is aws
Once you have the nameservers, Please open the dns page
You will see 2 nameservers that are for godaddy
Click on change option and then select I will use my own nameservers and then update the nameservers that will be provided.

Where I can see what are the names servers used in AWS Cloudfront?

Peter Penzov
  • 1,126
  • 134
  • 430
  • 808

1 Answers1

2

You need to setup the domain in Route53 first (eg example.com), as part of the setup you get 4 name server addresses. You change the name servers at GoDaddy to your AWS nameservers as their support describe, which authorises Route53 to host your DNS. From then on you manage your DNS from Route53, not GoDaddy (but GoDaddy are still your registrar).

Once your nameservers point to route53 follow the docs on creating an alias in route53

If you want to use your own domain name, use Amazon Route 53 to create an alias record that points to your CloudFront distribution. An alias record is a Route 53 extension to DNS. It's similar to a CNAME record, but you can create an alias record both for the root domain, such as example.com, and for subdomains, such as www.example.com.

When you change the nameservers on GoDaddy any DNS you setup there will no longer be visible on the internet, only whats in Route53. Transfer any records you have created in GoDaddy to Route53 before changing your nameservers. Ignore any DNS records you didnt create.

If theres a problem you can goto GoDaddy and reset the nameservers back to default and that will restore the previous DNS.

One thing to mention - TTL - time to live. If DNS records have a high TTL (in seconds) it means when you make changes it will take upto that amount of time for everyone to get the update. The TTL will be visible in GoDaddy, or you can search "DNS dig" to find online tools that read DNS. The TTL of the NS records might be high (days, a week etc) - this will effect how long it takes Route53 to fully take over responsibility of your DNS.

MisterSmith
  • 2,884
  • 1
  • 10
  • 13
  • Route 53 is additional service for which I will be charged right? I'm asking because I use free tier? – Peter Penzov May 28 '21 at 20:26
  • If you want free leave your DNS with GoDaddy and create a CNAME to cloudfront - but you cant use the apex domain with cloudfront (example.com) only subdomains (www.example.com). Having your DNS in Route53 is easier as its integrated with CloudFront & ACM but its not a requirement if you can live with some limitations and do some manual steps. If you cant you need Route53 which is a paid service but its (probably) pretty trivial cost depending on your usage - https://aws.amazon.com/route53/pricing/. Dont set your TTL's too low and it probably wont cost much. – MisterSmith May 28 '21 at 20:41