DNS not working

November 11, 2016 257 views
DNS Server Optimization Debian

Can anyone help me with my server? My DNS doesn't seem to be working. I continuously get this error "www.45.55.201.63’s server DNS address could not be found."

5 Answers

There is period called DNS Propagation. It's the period needed to wait after changing nameservers. As you are using Namecheap (correct me if I'm wrong), it could take 24-72 hours. Namecheap explained this very well for their service and this is something you can read - DNS Propagation – Explained.

I don't think it's anymore problem. Before half hour (about 21pm CET) whois would return following nameservers:

WHOIS output for nameservers
Name Server: DNS1.NAMECHEAPHOSTING.COM Name Server: DNS2.NAMECHEAPHOSTING.COM

Now it does return DigitalOcean nameservers but I'm still not able to ping your site:

WHOIS output for nameservers
Name Server: NS1.DIGITALOCEAN.COM Name Server: NS2.DIGITALOCEAN.COM Name Server: NS3.DIGITALOCEAN.COM

If it still doesn't work for you - verify you added domain correctly.
When you go to Control Panel -> Networking, you must domain added as it is. It must be added as csgodash.win not for example www.csgodash.win or something other.

You must have 4 records under that domain - 3 NS records and 1 A record pointing to Droplet IP.
To check if everything is correct you can also look at zone file, in your case it should look in lines of this:

$ORIGIN csgodash.win.
$TTL 1800
csgodash.win. IN SOA ns1.digitalocean.com. hostmaster.csgodash.win. 1477773333 10800 3600 604800 1800
csgodash.win. 1800 IN NS ns1.digitalocean.com.
csgodash.win. 1800 IN NS ns2.digitalocean.com.
csgodash.win. 1800 IN NS ns3.digitalocean.com.
csgodash.win. 1800 IN A droplet-ip

By image you linked - it looks OK. But make sure you added domain correctly. :)

  • Thank you for the in depth response. Is this fine as well? This is my namecheap: http://prntscr.com/d64gq8

    • This look OK, but there is some another problem.
      There is dig tool, used to get DNS records for any domain. When I run it for you domain I get error:

      • dig csgodash.win
      Output of dig csgodsah.win
      ; <<>> DiG 9.10.3-P4-Ubuntu <<>> csgodash.win ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 32593 ;; flags: qr rd ra ad; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 1 ;; OPT PSEUDOSECTION: ; EDNS: version: 0, flags:; udp: 512 ;; QUESTION SECTION: ;csgodash.win. IN A ;; AUTHORITY SECTION: win. 1799 IN SOA ns1.dns.nic.win. hostmaster.neustar.biz. 1049199 900 900 604800 7200 ;; Query time: 33 msec ;; SERVER: 2001:4860:4860::8844#53(2001:4860:4860::8844) ;; WHEN: Fri Nov 11 22:12:01 UTC 2016 ;; MSG SIZE rcvd: 111

      It's not any better for nslookup - tool that lookup for nameserver records:

      • nslookup csgodsah.win
      Output of nslookup csgodsah.win
      Server: 127.0.1.1 Address: 127.0.1.1#53 ** server can't find csgodsah.win: NXDOMAIN

      I found that NXDOMAIN is domain non-existing. Why... I really can't say. I never get into this problem, I use Namecheap for one of main domain but never got into problem.
      You can post ZONE file so we can see if it's correctly setup on DigitalOcean side. Go to Control Panel -> Networking -> select you domain, scroll to bottom and you shall see ZONE file.

      • Thank you for the quick response. Here you go, here is the zone file: http://prntscr.com/d650zv

        • This looks good, you added domain correctly.
          I think the time is only thing you need now.

          I'm using Google Public DNS and it could be it isn't updated with your new domain. Why I think that can be explained with this two commands:

          • dig csgodash.win any
          Output of dig for csgodash.win
          ; <<>> DiG 9.10.3-P4-Ubuntu <<>> csgodash.win any
          ;; global options: +cmd
          ;; Got answer:
          ;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 33147
          ;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 1
          
          ;; OPT PSEUDOSECTION:
          ; EDNS: version: 0, flags:; udp: 1480
          ;; QUESTION SECTION:
          ;csgodash.win.          IN  ANY
          
          ;; AUTHORITY SECTION:
          win.            7200    IN  SOA ns1.dns.nic.win. hostmaster.neustar.biz. 1049321 900 900 604800 7200
          
          ;; Query time: 50 msec
          ;; SERVER: 127.0.1.1#53(127.0.1.1)
          ;; WHEN: Fri Nov 11 23:49:48 CET 2016
          ;; MSG SIZE  rcvd: 111
          

          But if I query DigitalOcean it shows correct output:

          • dig @ns1.digitalocean.com csgodash.win any
          dig output from DigitalOcean NS
          ; <<>> DiG 9.10.3-P4-Ubuntu <<>> @ns1.digitalocean.com csgodash.win any
          ; (1 server found)
          ;; global options: +cmd
          ;; Got answer:
          ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 27086
          ;; flags: qr aa rd; QUERY: 1, ANSWER: 5, AUTHORITY: 0, ADDITIONAL: 4
          ;; WARNING: recursion requested but not available
          
          ;; OPT PSEUDOSECTION:
          ; EDNS: version: 0, flags:; udp: 512
          ;; QUESTION SECTION:
          ;csgodash.win.          IN  ANY
          
          ;; ANSWER SECTION:
          csgodash.win.       1800    IN  NS  ns1.digitalocean.com.
          csgodash.win.       1800    IN  SOA ns1.digitalocean.com. hostmaster.csgodash.win. 1478900181 10800 3600 604800 1800
          csgodash.win.       1800    IN  NS  ns2.digitalocean.com.
          csgodash.win.       1800    IN  A   45.55.201.63
          csgodash.win.       1800    IN  NS  ns3.digitalocean.com.
          
          ;; ADDITIONAL SECTION:
          ns1.digitalocean.com.   1800    IN  A   173.245.58.51
          ns2.digitalocean.com.   1800    IN  A   173.245.59.41
          ns3.digitalocean.com.   1800    IN  A   198.41.222.173
          
          ;; Query time: 85 msec
          ;; SERVER: 173.245.58.51#53(173.245.58.51)
          ;; WHEN: Fri Nov 11 23:50:24 CET 2016
          ;; MSG SIZE  rcvd: 222
          

          That's correct output and you should see something like that when you execute first command.
          I guess DNS Propagation is not finished and you need to wait.
          You can try flushing DNS or even restarting your Internet Modem. I had situations where restarting Internet Modem helped and it got working right after it. Now I'm not able to do so, you'll have to try it yourself. ;)

        • I'm not able to reply anymore to latest comment. :D

          Flushing DNS depends on OS. If you use Windows on your PC, open Command Prompt and execute ipconfig /flushdns.
          For Ubuntu... Someone says that it doesn't cache DNS but you can make sure that it doesn't save anything with:

          • sudo /etc/init.d/dns-clean start
          • sudo /etc/init.d/networking force-reload
        • @fadeinvisible It's working now - screenshot. :D
          I hope it got working for you too.

how can someone help you if you dont give your domain name?

Have another answer? Share your knowledge.