Route 53 Primary DNS Host Name: Primary DNS IP Address - amazon-web-services

I recently bought a domain name.
I want to use the domain to route it to my shopify store. So inside of Route 53 I create A record and CNAME. However, my domain provider is asking for Primary and Secondary IP and Hostname.
What should I provide?

https://aws.amazon.com/route53/faqs/
Once you create the hosted zone for your domain in Route 53, AWS assigns you name servers:
"Q. How do I get started with Amazon Route 53?
Your hosted zone will be initially populated with a basic set of DNS records, including four virtual name servers that will answer queries for your domain. "
They will look something like this:
ns-85.awsdns-10.com.
ns-1686.awsdns-18.co.uk.
ns-1200.awsdns-22.org.
ns-956.awsdns-55.net.
The ones shown in your hosted zone (not the ones I list above!) are the name servers that the domain registrar wants.
Exactly how you enter these is different for each domain seller, but you can ask their support or look it up in their knowledge base.
If your domain reseller forces you to enter IP addresses, you can get them using "ping" command. In Windows you would open a command box and type (for example):
ping ns-85.awsdns-10.com
Again, use the names shown in your hosted zone.

Related

how to let web application use the purchased domain name through ROUTE 53 in AWS?

I have purchased a domain name through ROUTE 53.
2) I have created a EC2 instance and put my web application inside it that is supposed to be hosted.
3) I have configured the Gunicorn and nginx as my WSGI and web server.
How to use the purchased domain name to integrate with my application to see over the internet. I have seen many documents post on stackoverflow, and youtube videos. But I am not able to get the clear picture of what am suppose to do next.
I get that once the domain is registered I have 4 ns records generated inside the ROUTE 53. But where to use them? how to configure them.
It be helpful if somebody can give me exact steps to perform the tasks.
Thank you,
Route53 is similar to other DNS servers with extra features, in your case, you will need to assign your ec2 instance a public IP address and to be safe an Elastic IP to avoid IP change on reboot, then you need to grab this public IP and assign it to your domain root A record and www CNAME record to point to that domain
I get that once the domain is registered I have 4 ns records generated
inside the ROUTE 53. But where to use them? how to configure them.
Normally it's not required but it's helpful to control your DNS configuration from route 53 instead of the DNS registrar.
Create Hosted zone in route 53, for example if your domain name is example.com then create Hosted zone in route with name example.com, it will generate name server record.
Open newly created hosted zone and copy Name server (NS) record and replace the NS record in your DNS setting.
When you create a hosted zone, Route 53 automatically creates a name server (NS) record and a start of authority (SOA) record for the zone. The NS record identifies the four name servers that Route 53 associated with your hosted zone. To make Route 53 the DNS service for your domain, you update the registration for the domain to use these four name servers.
Add these record in DNS Name server, for example the below one is used for Godaddy
migrating-a-domain-to-amazon-route53

Route 53 with external Domain Registrar?

I have created a Route 53 hosted zone which contains a SOA, an NS record and a A record.
The A record points to the web instance I have hosted on AWS.
On the registrar what do I need to use to get the domain to use Amazon Route 53, is it just Nameservers? Or do I need an A record or a CNAME?
Which Nameservers should I use the SO or the NS record?
Thanks
Just name server entries, here is AWS documentation on Migrating DNS Service for an Existing Domain to Amazon Route 53.
Which name servers? Here are steps on how/where to get them and add them in 3rd party server.
Step 5: Update Your Registrar's Name Servers
Step2: In the Amazon Route 53 console, get the name servers for your Amazon
Route 53 hosted zone:
Sign in to the AWS Management Console and open the Amazon Route 53
console at https://console.aws.amazon.com/route53/.
In the navigation pane, click Hosted Zones.
On the Hosted Zones page, choose the radio button (not the name) for
the hosted zone.
In the right pane, make note of the four servers listed for Name
Servers.
Alternatively, you can use the GetHostedZone action. For more
information, see GetHostedZone in the Amazon Route 53 API Reference.
Step3: Using the method provided by the registrar for the domain, replace the
name servers in the registrar's NS records with the four Amazon Route
53 name servers that you got in step 2.
Note Some registrars only allow you to specify name servers using IP
addresses; they don't allow you to specify fully qualified domain
names. If your registrar requires using IP addresses, you can get the
IP addresses for your name servers using the dig utility (for Mac,
Unix, or Linux) or the nslookup utility (for Windows). We rarely
change the IP addresses of name servers; if we need to change IP
addresses, we'll notify you in advance.
You are still using your registrar's Name Server.
Change it to AWS Route53 name server.
Just adding the name servers to the registrar's website, brought my domain up and running.

How does Route 53 connect multiple public hosted zones to one domain name?

I have two public hosted zones in Amazon Route 53 for the same domain name (which has Route 53 as registrar), for the reason that Route 53 automatically created one when I registered the domain name and that the second one was created by Terraform.
As far as I can tell, DNS record sets in the second zone aren't applied, i.e. they're not returned for queries to the domain. Do I have to delete the first zone in order for record sets in the second zone to be active?
As far as I can tell, which hosted zone is active, meaning that its record sets are returned for queries to the domain, depends on the name servers registered with the domain. So, in order to make my second zone active I have to update the domain's name servers, in Route 53, to correspond to those of the desired hosted zone.
Following is an extract from the AWS Route 53 FAQ
Q. Can I create multiple hosted zones for the same domain name? 
Yes. Creating multiple hosted zones allows you to verify your DNS setting in a “test” environment, and then replicate those settings on a “production” hosted zone. For example, hosted zone Z1234 might be your test version of example.com, hosted on name servers ns-1, ns-2, ns-3, and ns-4. Similarly, hosted zone Z5678 might be your production version of example.com, hosted on ns-5, ns-6, ns-7, and ns-8. Since each hosted zone has a virtual set of name servers associated with that zone, Route 53 will answer DNS queries for example.com differently depending on which name server you send the DNS query to.
Click here for more details
How is Domain-Name, Namespaces, and Hosted-Zone connected?
Imagine you bought a new name from GoDaddy - example.com. Then you setup your website in your EC2 machine which has IP 100.0.0.10. To point example.com to your webserver, you will need to first choose a DNS resolver. AWS provides one - Route53. A DNS resolver translates names like example.com to IP address like 100.0.0.10.
AWS Route53 has a concept of Hosted Zones. You will need to create a hosted zone for example.com. Route53 will then give you nameservers (bunch of different URLs, AWS gives you 4). You will take these nameservers and go back to GoDaddy and there is a section to put those nameservers. This tells GoDaddy where to send the request to.
Why did we do above ^^^ ?
When you purchased the name from GoDaddy, GoDaddy became your registrator i.e. it registered your name with the DNS authorities. So whenever someone requests example.com to the DNS authorities, they will forward the request to GoDaddy. So GoDaddy needs to know where to send the request to. These nameservers tells GoDaddy that exact information.
After the request reaches AWS Route53, it knows that this domain name example.com needs to go to 100.0.0.10.
What if I create 2 Hosted Zones with the same domain name example.com?
A hosted-zone is nothing but Route53's way to define a set of route rules for a domain.
If you have 2 hosted-zone with the same domain name, you will have 2 sets of namespaces. For AWS, each set has 4 namespace, so total of 8 namespaces).
So now it depends which namespaces you give to GoDaddy. You can give it set A, in which case your second hosted-zone will not receive any traffic. You can give it set B, in which case your first hosted-zone will not receive any traffic. Or, you can give it a mixture of both set A and set B, in which case GoDaddy will send some requests to set A and some to set B, not both though.

Cannot set custom domain name with Route 53

I have a custom domain name, let's say example.co.uk. I originally purchased it through 123 Reg but have now transferred to Route 53. I have setup a Hosted Zone for that domain name.
I have been looking at many guides but for the life of me I cannot set the custom domain name, I can only access my site through the Elastic IP.
How can I get this to work?
Did you fully transfer the domain to Route53 or did you just change the name servers in 123reg to point to the Route53 name servers? If you fully transferred the domain, make sure you update the name server records in the Hosted Zone to match the name server records listed in the Route53 Registered Domains section.
To point your domain to your server you simply need to create an A record in the Hosted Zone that points to the Elastic IP. You also could have done that in 123reg without using Route53 at all.

AWS deleted sub-domain then re-added, now inaccessible

I have a primary domain which points to an EC2 instance which works fine. I setup a sub-domain via this article. I pointed this sub-domain to the same ec2 instance which then served different resources via Apache2.
As I am still new to AWS, I wanted to try something out, the something being not using a second hosting zone for the sub domain. So I deleted the sub domains hosted zone and removed the related name records from the primary domains record set.
I did my little experiment, which didn't work. I once again removed all of the name records related to the sub domain from the primary domains hosted zone. I then followed the same article to re-setup the sub-domain. I added the new name service records to the primary domains hosted zone.
Now here's the problem. When I test the sub-domains records, they are all fine. When I test the primary domains name server records for the sub-domain, it responds with NOERROR but it also does not point to the EC2 instance. If I try to navigate to the sub-domain via the browser, a "server DNS address could not be found" is returned. Yet, when I run a tool like DNS Lookup, the correct name servers are resolved.
What am I missing here?
Additional information:
The name servers in the sub domain look like this:
name: blog.quotr.ca
ns-1028.awsdns-00.org.
ns-253.awsdns-31.com.
ns-1778.awsdns-30.co.uk.
ns-576.awsdns-08.net.
The primary domains hosted zone entry for the sub-domain looks like this:
name: blog.quotr.ca
ns-1028.awsdns-00.org.
ns-253.awsdns-31.com.
ns-1778.awsdns-30.co.uk.
ns-576.awsdns-08.net.
Please note, navigation to the primary domain quotr.ca is still accessible (albeit locked down to my ip currently).
Thank you
The subdomain uses the same name server as the primary domain. The NS records are against the domain in Route 53.
Then just create the sub-domains within the same Hosted Zone.