I accidentally deleted my AWS hosted Zone which included deleting the ns and soa records. I created a new hosted zone using my existing DNS name but discoverd that the name server (ns) DNS names were different. I went to the registered domains section of AWS and got what I believe is the original ns DNS names. I edited the new hosted zone ns records and replaced them with the registerd ns DNS names. However I still cannot access my domain resources using my domain name. Its only been an hour or so but still no luck. I did a AWS CLI command "aws route53 get-hosted-zone --id /hostedzone/Z07300422FPN7YUXX4SDQ" found that the ns DNS names were different than the ones I edited. So right now when I go to the AWS hosted zone and examine the ns DNS names they match the AWS registered domain ns DNS names. However when I issue the AWS CLI command "aws route53 get-hosted-zone --id /hostedzone/Z07300422FPN7YUXX4SDQ" I get a different set of ns DNS names. Is my proceedure correct? Do I have to wait longer? Is their a better way?
I think you should contact AWS Support.
The name servers (NS Records) are given to you by AWS when you create a Hosted Zone.
From the Route53 Docs
If you change the NS records, it doesn't change the name servers that Route 53 allocated. You cannot change the name servers that are associated with an existing hosted zone.
You can try white-labeling the name servers but it doesn't seem like these step will work if the hosted zone is deleted.
Related
I have a couple of ECS tasks running in Fargate behind an ALB. I want to use a custom domain for the ALB so I created a hosted zone and an A record that points to the ALB but when navigating to the record name I get the "This page isn't working error". Is it mandatory to register the domain via the Route 53 or any other registrar or is the hosted zone and record enough for it to work? We have other ALBs with custom domains and when I navigate to the url the site comes up just fine. Settings look like mine so I am not sure if those are using a different registrar, which my hunch says they do.
Thanks for the help!
Is it mandatory to register the domain via the Route 53 or any other registrar or is the hosted zone and record enough for it to work?
The hosted zone is not enough for it to work. You absolutely have to register the domain with a domain registrar. You have to own the custom domain you are trying to use. You can use any registrar, not just Route53. You have to configure your Route53 hosted zone's NS records with the domain registrar before the hosted zone will work.
So I have a Hosted Zone(H1) for my Custom Domain Name for API-Gateway created via Cloudformation CDK initially.
Then I created a hosted zone(H2) for an ALB with the exact same domain name.
After creating the new hosted zone (H2), It seemed to overwrite the previous one (all traffic to the domain was going to the ALB) even though the previous Hosted Zone (H1) and its records still existed in Route 53 (untouched). Is this the expected behavior?
I ended up deleting (H2) but it did not renable the old hosted zone, now the domain is sort of just dead even though the hosted zone is still showing on Route53.
Yea I found the issue. My hosted zones were actually created for a subdomain in which a parent hosted zone delegated sub domain to my hosted zone via NS record.
I want to connect my domain (in AWS Registered Domains) to the IP address of my Ec2 instance in my AWS account; so that I can type www.my-domain.com in any browser and open my website.
I transferred a domain name from my old AWS account to a new one. Usually AWS creates a hosted zone for the domain automatically, but it didn't.
So I created my own hosted zone and and added and two A records (www.a.com and a.com) with value connected to the IP address of my Ec2 instance but the browsers didn't recognize the domain.
So I tried:
Updating the Name servers of the hosted zone to be the same as the domain name NS But same result
Updating the Name servers of the domain name to be the same as the hosted zone NS But same result
What can I do?
Thanks.
As long as the domain registrar is AWS (you can validate this by running whois against your domain) the setup should be quite simple.
Firstly it might be worth creating a new hosted zone if you've modified the NS records for it. It is important that these values are the original domains that AWS entered against the values. Also ensure the hosted zone is a public hosted zone.
Copy each of the nameserver values from your public hosted zone (there should be 4 in total). Then on your registered domain in the Route 53 console, edit the nameservers replacing the values with the values that were taken from your hosted zone. Once you have done this the new public hosted zone will be used by your domain.
Depending on any TTL caching you might find it can take a little time for clients to use this nameserver but you can test it by using a DIG command to find the NS value using an external server or the web service offered by google.
I don't know if this could count as and answer but this is what I did to fix the problem:
I created and Application Load Balancer
With Security Group with Inbound rules: HTTP TCP 80 0.0.0.0/0, ::/0
And Target Group TCP 80 Set to Ec2 instance.
Connect the A record to the ALB
This fixed my problem
Haven't seen something like this (Hosted zone transfer maybe?), so I'll try here.
I have a pretty straightforward question, so I am hoping that someone can answer it or has any experience with the same case.
I have registered the domain using Route53 DNS service on one AWS account. I would like to use that registered domain on another AWS account, using it primarily for creating CNAME records for the load balancers. I have updated the NS records for the domain to match the second AWS account NS records and I am able to use and created hosted zone in that second account, but the CNAME or # records are not resolvable.
This can sometimes be tricky so I am going to cover the initial steps.
You create a new hosted zone in Account B
You add that hosted zones NS record in Account A. This is a new NS record in the master record (mydomain.com)
You then add an alias for your load balancer on your hosted zone in Account B.
It looks like you are doing all of this so a few other things you can check:
The security group associated with your ELB allow port 80 or 443.
The public subnets associated with your ELB have routes to the internet gateway.
The NACLs on your subnets allow port 80 or 443.
In AWS, are you able to create multiple hosted zones for one domain? Say I have a domain called example.com.
In one account, I create a hosted zone for example.com and add the NS record to the DNS service.
In second account, I create another hosted zone for example.com and add the NS records to the DNS service for example.com.
1) Is this possible?
2) If it is, do I need to keep the record sets in the both hosted zones in sync with each other?
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.