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.
Related
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
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.
The numerical IPv4 address for my EC2 instance works perfectly. However, when I create an A record for my domain to point to the IPv4 address browser returns "Cant find the server"
I have created a hosted zone In route53, under DNS management. My name server match the ones from the domain with the one in my hosted zone.
Not sure why my domain is not working but the IPv4 address is working fine.
Ok, so Route53 can be confusing for people who first start using domain names and dont' have a lot of experience with DNS. Let me walk through what you are seeing on the console:
When you registered your domain, it automatically created a "Hosted Zone" for you. When you click on Route53 and it shows you all your hosted zones, if you click on the one you're trying to forward, the NS records that show up to the right on the console must match the ones that appear when you click on your domain. If they don't match, no amount of forwarding will work.
If you created a new Hosted Zone, you may need to update the name servers on your domain. A common mistake is to open the hosted zone, and modify the NS entry in the hosted zone. This will not work. The NS record forwards to those name servers, it doesn't change the name servers of that hosted zone. The hosted zone will always have the same name servers.
Once you've successfully forwarded your name servers, an "NSLOOKUP" on your domain should return your name servers.
Once all that is set up, creating an A record within the hosted zone should now forward to your IP (or better yet, a load balancer URL).
To recap:
Create a domain, which will automatically create a hosted zone.
Create a new hosted zone (which is assigned 4 new name servers)
Create an NS entry in the original hosted zone that points to the newly created hosted zone's name servers
Create an A record in the new hosted zone to forward your domain
I have setup a Wordpress on Lightsail, and have created a static IP which I can access WP ok.
I have migrated my .co.uk domain across to Route53 from another provider and am trying to point blog.example.co.uk to my Lightsail instance.
In Lightsail I have setup a DNS record like this:
A example.co.uk 12.34.56.78
A blog.example.co.uk 12.34.56.78
It then lists these DNS servers in Lightsail:
ns-849.awsdns-42.net
ns-1643.awsdns-13.co.uk
ns-341.awsdns-42.com
ns-1516.awsdns-61.org
I've taken those DNS servers and set on the root of my domain in Route 53 under Domains > Registered Domains
I am not sure if that was the correct thing to do, as I will have other subdomains eventually that will point elsewhere, should the Lightsail DNS servers be added at that level? If not, what do I set them back to be?
I have also created a Route53 Hosted Zone, and have created an "A" entry that links blog.example.co.uk to 12.34.56.78, is that required?
As mentioned in the comments, I was facing the same challenge.
What ended up working for me was simply creating an Alias Record (A) for my subdomain, subdomain.example.com, that points to the static IP of my Lightsail instance.
I did not add Lightsail's DNS servers anywhere on Route53.
I made sure that the NS entries for my root domain – example.com – pointed to the Name servers entries on my registered domain in Route53.
You can find the name servers associated with your Route53 registered domain by going to Registered domains > mydomain.com; they're located on the upper-right corner.
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.