0
votes

I am new to AWS and having trouble in linking my recently transferred domain to the EC2 Web application which is running on Ubuntu.

Cpnfigurations

EC2 Setup is done. Assigned an Elastic IP to EC2. Assigned liost of Name Servers to Recently transferred domains. Created Hosted Zone with new A record with Name: mydomain.com Alias : no Value :

When try to Access My web application using static IP it works fine. Hoever, with domain it doesnt seems resolving the host.

nslookup for domain gives below result

Server: UnKnown Address: fe80::1

DNS request timed out. timeout was 2 seconds. *** Request to UnKnown timed-out

Any help would be appreciated. Thanks in Advance

Thank you so much for providing all these information.

I have few additional information from http://viewdns.

info Missing NS records at local servers oops! It appears that the following name serves listed at the parent servers are not listed at your local servers: ns-1089.awsdns-08.org. ns-1886.awsdns-43.co.uk. ns-431.awsdns-53.com. ns-765.awsdns-31.net.

Local nameservers answer authoritively
Oops! The following nameservers do not answer authoritatively for your domain: ns-431.awsdns-53.com. ns-765.awsdns-31.net. ns-1089.awsdns-08.org. ns-1886.awsdns-43.co.uk.

Missing NS records at local servers Oops! It appears that the following nameserves listed at the parent servers are not listed at your local servers: ns-1089.awsdns-08.org. ns-1886.awsdns-43.co.uk. ns-431.awsdns-53.com. ns-765.awsdns-31.net.**

1
Did you log into your domain registrar and update the nameservers for your domain to point to the ones that Route53 provided to you? Are you willing to provide the name of your domain so we can check the DNS for it? (You can always edit the domain name out once you've resolved the issue.)Bruce P
Yes I did. Updated list of name servers to my domain in route 53. My domain name is trueweekends.in.Roshin

1 Answers

1
votes

After testing your domain and re-reading your question, I realized that this is likely the problem:

Created Hosted Zone with new A record with Name: mydomain.com Alias : no Value :

Since you're just using an individual EC2 instance you don't want to be using an alias. As the Route53 documentation states, aliases only apply to Elastic Load Balancers, S3 buckets, CloudFront (CDN) endpoints, and records within the same domain.

What you likely want to do is remove any A records that you have defined and then create a CNAME for mydomain.com (not an alias) that has a value of the EC2 DNS record for your instance. You might also want to create a www.mydomain.com record that is also a CNAME to your EC2 DNS record.

Once you've created those CNAME records then nslookup should give you results something like this:

$ nslookup mydomain.com
Server:     10.1.2.11
Address:    10.1.2.11#53

Non-authoritative answer:
mydomain.com    canonical name = ec2-111-222-123-1.eu-west-1.compute.amazonaws.com.
Name:   ec2-111-222-123-1.eu-west-1.compute.amazonaws.com
Address: 111.222.123.1  

Don't forget that when you make changes to your DNS records it will take some time for those changes to take effect when you test it. Route53 defaults to a TTL of 300 seconds (5 minutes) so unless you changed the TTL you should see the change reflected within 5 minutes. You can see how many seconds are left in the TTL if you use dig instead of nslookup:

$ dig www.news.com
...
;; ANSWER SECTION:
www.news.com.       234 IN  CNAME   phx1-rb-gtm3-tron-xw-lb.cnet.com.

The "234" there means that the local DNS server will expire this result in 234 seconds and query the authoritative DNS server once again. You'll need to wait for that value to hit 0 before your local DNS server will look up mydomain.com or www.mydomain.com the next time around.

Edit:

I would suggest double-checking your nameservers in Route53 and verify them in your domain registration. If I do a whois on your domain it shows:

$ whois trueweekends.in
...
Name Server:NS-1089.AWSDNS-08.ORG
Name Server:NS-765.AWSDNS-31.NET
Name Server:NS-431.AWSDNS-53.COM
Name Server:NS-1886.AWSDNS-43.CO.UK

I should be able to query any of those nameservers and get a listing of the same nameservers back from them. For example, take a look at the domain todoist.com, which is also hosted on AWS:

$ whois todoist.com
...
Name Server: NS-938.AWSDNS-53.NET
Name Server: NS-1046.AWSDNS-02.ORG
Name Server: NS-1799.AWSDNS-32.CO.UK
Name Server: NS-158.AWSDNS-19.COM

If I query one of those nameservers for a list of nameservers associated with todoist.com then I get:

$ dig @NS-938.AWSDNS-53.NET todoist.com NS
...
;; ANSWER SECTION:
todoist.com.        172800  IN  NS  ns-1046.awsdns-02.org.
todoist.com.        172800  IN  NS  ns-158.awsdns-19.com.
todoist.com.        172800  IN  NS  ns-1799.awsdns-32.co.uk.
todoist.com.        172800  IN  NS  ns-938.awsdns-53.net.

If I do the same sort of thing with your domain I don't get any results. The following queries all result in no answers:

$ dig @NS-1089.AWSDNS-08.ORG trueweekends.in NS
$ dig @NS-765.AWSDNS-31.NET trueweekends.in NS
$ dig @NS-1799.AWSDNS-32.CO.UK trueweekends.in NS
$ dig @NS-158.AWSDNS-19.COM trueweekends.in NS

If you're 100% sure that you have the correct nameservers listed in your domain (the ones I mention above match what Route53 shows you should be using) and you're sure your records within Route53 are set up properly then I would suggest contacting AWS support because it sounds like there's some sort of issue with Route53 not handling your domain properly.