I am new to AWS and facing this issue for the past few days. So any help will be appreciated :)
I have created an AWS EC2 instance and deployed backend&frontend services on SINGLE INSTANCE that are used in my project.
Backend->Java,Apache tomcat,RDS,Elasti cache
Frontend-> Node
And now created a hosted zone under Route53 to host my Namecheap domain in AWS EC2.
Have checked all configs thrice, and added A type(Value as ec2 IP) and CNAME(Value as domain name e.g. xxyyzz.liv) type variables in the hosted zone including modifying nameservers from hosted zone to the Namecheap DNS settings.
Even after long waiting(of 48 hrs) my domain is not getting live, tried multiple times but no help.
This will be caused by misconfiguration. Perform the following steps to rectify this issue:
Ensure you have not replaced the NS or SOA records in Route 53, these should stay as the values that Route 53 generates. If you have replaced their values, create a new public hosted zone and migrate the records to this (excluding NS or SOA).
Run DIG against your domain for the MX record, either by running DIG NS example.com or by using an online tool such as https://toolbox.googleapps.com/apps/dig/. If you get no results back (returning a SERVFAIL) or incorrect name servers back then you will need to update the name server configuration.
Within your public hosted zone in Route 53 look for the NS record, copy the values (there will be 4 nameservers). Then within namecheap follow these instructions for "Custom DNS". Add each name server from Route 53.
By now running DIG again you should be able to see the records that should have previously been accessible. Depending on the TTL of the previous NS record you might find it takes a few hours/days for the DNS to migrate across, although you can clear the DNS cache on your local network.
Related
I registered domain with AWS and set Hosted Zone.
inside the hostedzone i have NS with 4 records and SOA as a record type
I added A record type and point it to EC2 public IP.
in browser i can not get response when type domain name.i got "This site can’t be reached"
search here and some people advice to check NS with dig command.
dig command answered when i run in on Ec2 Ubuntu command but didn't get response when run it on my laptop.
I have other sites on roure53 but new one doesn't work.
any thought?
How did you registered the domain? Did you purchase it from a website and paid for it?
From what you said, it seems the FIRST thing you did was creating a Hosted Zone in Route53. Let me explain.
Usually when we purchase a domain from another website, after paying for it and everything we will need to tell the Domain Registrar to use the Name Servers and input a value like ns1.abcdomain.com and ns2.abcdomain.com . The purchase of a domain name usually comes with a free DNS service, so it will already have a valid name servers defined.
If my guess is correct, you created a hosted zone in AWS Route 53 without actually paying and registering a domain with a registrar (AWS is also a registrar). Therefore the domain only exist in AWS world because you created a Hosted Zone.
This explains why running dig on your EC2 provided the expected IP, because somewhere along the line the EC2 reaches AWS internal Route53 DNS service before reaching the public internet for DNS result.
If you indeed paid AWS something like $12 to purchase a domain, you might have misunderstood their interface (which can be confusing sometimes) and missed appointing Route 53 to be the domain's Name Servers.
I'm running an ec2 instance. If I ping the instance based on its elastic IP I get a response. If I use my registered domain I can not access that elastic IP address anymore. In Route 53 (under the DNS Management) I have 1 hosted zone with 3 record sets:
an A record set with my domain and the elastic ip address
an automatically assigned AWS NS record
an automatically assigned AWS SOA record
So, basically the only entry I added was the A (that corresponds to the name of my domain and the elastic IP address as a value. Not sure why it's not binding.
My ec2 instance has no firewall and for the time-being both (the inbound and the outbound) sections of my aws firewall are set to "all traffic".
when I use a domain validator I do not get anything back. It behaves as if the domain did not exist. The domain was created over a year ago (so this is not a new domain). I checked in the dash-board and as far as I can tell all the information (contact info, verification info) looks fine.
Furthermore, the "test-record" feature in the Route 53 does return the IP address on a "UDP" port.
What am I missing? Do I need anything else?
Edited
Edited 2
I have deleted the 1 hosted zone and created a new: now it looks like this:
If you bought the Domain from other than AWS then you need to manually update its name server from their portal (godaddy,etc).
So this is how it goes in case of others:
create a Hosted Zone in Route53 which you already did
NS and SOA records will be auto-generated however, it's important to note that the auto-generated NS will NOT update the domain's NS automatically. You need to update it manually
Add A records as shown in image below
Then go to your domain portal and change DNS, use auto-generated DNS from Route53
Changes will be refreshed as per your selected TTL but it usually updated in 5 mins
OR
If your Domain provider gives you the access to setup records in their portal then you can skip all the above steps and simply create A record there with your elasticIP to point your domain to ec2
EDIT
As you can see in picture nameservers mentioned on the top right corner of the image are different than your record NS, your NS records are wrong.
It's better that you delete this hosted zone and create new Public Hosted Zone. You will get new NS after creating a Hosted Zone then just go to domain editing and update nameservers with the new one on domain.
I've followed these instructions 'Creating a Subdomain That Uses Amazon Route 53 as the DNS Service without Migrating the Parent Domain' many times over without success. I configured a domain a couple of weeks ago and let it sit, I'm revisiting today and it's still not working.
My parent domain haynesandcompany.com is hosted with arvixe.com.
Here's my steps I took to implement as per the instructions;
Created a hosted zone 'helloamazon.haynesandcompany.com' on Route53.
Created a subdomain on my host arvixe.com for 'helloamazon.haynesandcompany.com', removed the NS records and replaced them with the NS records reported by Route53.
At this point the DNS config on arvixe for the subdomain contains 4 NS records only, nothing else.
Back on Route53 I created a TXT record to validate my work with the value "bensayshello" and also created an A record pointing to my Elastic Load Balancer instance ALIAS. My config on route 53 looks like this;
helloamazon.haynesandcompany.com A ALIAS dualstack.awseb-e-q-awsebloa-14c3yer0oht29-329340065.us-east-1.elb.amazonaws.com. Routing Policy: Simple, Evaluate Target Health: No
helloamazon.haynesandcompany.com NS ns-1845.awsdns-38.co.uk, ns-906.awsdns-49.net, ns-1063.awsdns-04.org, ns-461.awsdns-57.com
helloamazon.haynesandcompany.com SOA ns-1845.awsdns-38.co.uk. awsdns-hostmaster.amazon.com. 1 7200 900 1209600 86400
helloamazon.haynesandcompany.com TXT "bensayshello"
www.helloamazon.haynesandcompany.com A ALIAS dualstack.awseb-e-q-awsebloa-14c3yer0oht29-329340065.us-east-1.elb.amazonaws.com. Routing Policy: Simple, Evaluate Target Health: No
Based on my understanding, navigating to helloamazon.haynesandcompany.com now should work but it fails. dnsstuff.com DNS report serves up a bunch of warnings and errors and running a propagation test on whatsmydns.com shows every 2nd server OK, the rest return a fail. Mind you, it's been weeks since I set this all up so I don't think it's just a matter of giving it more time.
I think I see your mistake.
Created a subdomain on my host ... removed the NS records
If you did this correctly, there would not be any NS records for you to "remove." Based on that, don't create a separate subdomain as its own entity at the other DNS provider. There's going to be nothing to tie that back to the parent domain.
Inside the existing parent domain, at the other DNS provider, just create records of type NS for the host "helloamazon" using the name servers assigned to the hosted zone in Route 53.
That should be all you need.
I have registered a domain name with Amazon Route53 and I'm trying to link it to an EC2 instance. I'm unable to do this successfully. I have read documentation many times over, I have looked at many tutorials online, I have read many stack overflow answers. I still haven't been able t figure it out. Help will be greatly appreciated.
What I have done so far:
Launched EC2 instance and installed LAMP stack. I'm running a web app on the instance.
Associated an Elastic IP to the instance and I'm able to reach my web app using this IP address.
Registered domain name with Route53
Created a Hosted Zone with the same name of registered domain
Created a Record Set with the following info:
Name: example.com (of course not literally, I have my domain name here)
Type: A - IPv4 address
Alias: No
TTL(Seconds): 300
Value: Elastic IP of EC2 instance
Routing Policy: Simple
This is the point at which I am stuck. When I run nslookup example.com DNS server name in terminal I get the desired response. Running dig domain name, as expected returns no answers. How do I finally connect the Hosted Zone to my domain name to get the latter pointing to my EC2 instance?
Documenting the solution as an answer. It sounds like you got everything correct except hooking up the hosted zone Name Servers to the domain name. This is done via NS Records. When you create a new hosted zone, it automatically assigns you Name Servers. To link the two together, you need to enter the NS records under the "Registered Domains" area.
1. First get the NS records from your hosted zone
2. Copy those records to the appropriate domain under "Registered Domains".
Note: NS Record TTL (time to live) can be as high as 72 hours (rarely), so it could take a significant amount of time for the change to be reflected in a lookup tool like dig (or browser).
We are migrating to AWS, and so far we are quite pleased with the performance and ease of use the AWS console provides, especially the Route53 UX. However we ran into an issue.
We have 3 subnets (datacenters), and our old DNS provider we had it set-up like this:
example.us
www
sn1.example.us (local datacenter)
gateway (CNAME)
demo1
feature1
sn2.example.us (old datacenter)
gateway (A record for static ip)
app-a-1
service-a-1
sn3.example.us (aws vpc)
gateway (A record for elastic ip)
app-a-1
service-a-1
So when we migrated to Route53, I maintained the same structure, in that I created a separate "hosted zone" for each subdomain, as it makes each zone easier to administer.
The problem I am seeing is that gateway.sn1 and gateway.sn3 are not resolving, however gateway.sn2 is resolving. With respect to Route53, is it ok to maintain this structure, or should I just have one hosted zone for example.us, and put everything in there?
Update #1
When I created each separate zone, they each were defaulted to differing nameserver records, so I went in and updated all the other zones NS records to match sn2.example.us (as it was the only one working).
Update #2
Bad idea trying to share nameservers across the various hosted zones, when testing behavior, I was getting REFUSED responses. So it does look like I have to move all entries from subdomains (in other hosted zones) up into the parent zone, so I can use the parent's zone nameservers when updating registrar's nameserver information for the domain example.us
You can definitely do this in Route 53... just not the specific way you tried to do it.
Create 4 hosted zones, example.com, sn1.example.com, sn2.example.com, and sn3.example.com.
Don't change the NS entries. You can't. (You technically can, but it doesn't work, if you try.)
Give the assigned nameservers for example.com to the registrar.
Then, in the example.com hosted zone, create one NS entry with hostname sn1, and paste the 4 automatically assigned nameservers for sn1 (as assigned by Route 53 to the hosted zone for sn1.example.com) in the box. Repeat the process for sn2 and sn3 using the correct NS records originally assigned by Route 53 in each case.
The way you tried to implement this can't work, because changing the NS in a hosted zone doesn't change which actual Route 53 servers will respond to requests. That can't be changed.