0

I would like my domain to point traffic to an ELB DNS name, so that when someone accesses my domain, it spreads the traffic between the servers that the ELB points to (2 EC2 instances, part of an auto-scaling group).

When I copy the ELB DNS name and paste it into the browser, it works great. I get content from the running instances, and if I refresh it switches what instance I'm getting data from. So no problem there.

I think the problem is in my DNS settings.

I registered my domain with Amazon a few months ago. Today I created a public hosted zone for that domain, and followed these steps:

  1. put "www" for the name
  2. put "A-IPv4" for the type
  3. Alias: yes
  4. I selected the DNS name of my ELB from the drop down, under the list of load balancers
  5. Set routing policy to "Simple"
  6. Chose "no" health checks
  7. Saved record set

I also did the same process for a blank name, so both mydomain.com and www.mydomain.com should both go to the ELB.

Then I waited... and waited... but no matter how long I wait, I keep getting "this site can't be reached" when I go to www.mydomain.com. This happens on various browsers, various machines, various internet connections.

Also, when I use the "test record set" button at the top of my hosted zone, I get a response of "NOERROR."

What is the next step to troubleshoot this?

David
  • 1,620
  • 3
  • 20
  • 39
  • Use a DNS check tool. There are several tools on the Internet. I use https://mxtoolbox.com/ – John Hanley May 16 '19 at 18:47
  • @quasar - You cannot use a CNAME for the naked domain (example.com). The correct record type for AWS load balancers is A-ALIAS. – John Hanley May 16 '19 at 18:48
  • when I use that mxtoolbox.com tool, it says "Sorry, we couldn't find any name servers for 'mydomain.com'" however I should note that an NS record does exist (auto-populated) in my hosted zone – David May 16 '19 at 18:52
  • Did you register (change) the NS records with your Domain Registrar? – John Hanley May 16 '19 at 18:55
  • I don't remember doing that. I registered the domain with AWS, so I was hoping the NS record would be populated properly automatically when creating the hosted zone. But now that I look at the domain, I see that the NS for the domain is different from the values I see in the NS record of the hosted zone. Should I make them the same? – David May 16 '19 at 18:57
  • As a simple answer yes however I cannot see your setup. Document the records before changing anything in case you need to recover. You might read up on how DNS Name Servers work first to get a better comfort level. – John Hanley May 16 '19 at 19:04
  • after changing the NS record in my hosted zone to match the name servers listed in the domain (registered in Route53) unfortunately it is still not working – David May 16 '19 at 19:21
  • You will have to wait for the TTL to expire. How long is it set for? – John Hanley May 16 '19 at 19:23
  • I set it to 1 minute, but no luck. – David May 16 '19 at 19:46
  • What was it set to before? That is how long you must wait. The DNS check tools I mentioned can test to make sure you are correctly set up. Some require that you click refresh to get the current records. – John Hanley May 16 '19 at 19:48
  • hm, it was set to a big number - I'll check back tomorrow. thanks for all your help so far. – David May 16 '19 at 20:01
  • @David, John's diagnosis is correct, but you fixed the wrong thing. You'll need to change the NS records in your hosted zone back to their original values, and then make another change, elsewhere. See https://stackoverflow.com/a/43669003/1695906 for the steps to find those original values as well as how to set them as the authoritative nameservers for the domain. That isn't done inside the hosted zone. – Michael - sqlbot May 17 '19 at 00:18

0 Answers0