Linux Tutorials

How one can discover a web site’s DNS (identify server) tackle

SEOClerks

How can I discover a web site’s DNS tackle? How do I verify the present DNS servers of a site or web site utilizing a Linux or macOS command line choice? How do I discover DNS tackle of an internet site utilizing bash?

DNS stands for “Area Title System“. The DNS is a naming system for computer systems, servers and different community gadgets over the Web. DNS is created for us to translate human-friendly pc names into IP addresses. This web page reveals find out how to use Linux, *BSD, macOS, and Unix command dig or host to seek out DNS addresses and names.

Adblock detected 😱

My web site is made attainable by displaying on-line commercials to my guests. I get it! Adverts are annoying however they assist preserve this web site working. It’s onerous to maintain the positioning working and producing new content material when so many individuals block adverts. Please think about donating cash to the nixCraft through PayPal/Bitcoin, or turn into a supporter utilizing Patreon.

How one can discover a web site’s DNS tackle

To verify the present nameservers (DNS) for any area identify from a Linux or Unix/macOS command line:

Open the Terminal applicationType host -t ns domain-name-com-here to print the present DNS servers of a site.One other choices is to run dig ns your-domain-name command.To search out the delegation path from the foundation identify servers, strive: dig +hint your-domain-nameAbove Linux or Unix, instructions will present you detailed details about the area identify, together with its nameserver (DNS).

Allow us to see all instructions and examples in particulars.

Verify the present DNS servers of a site

Do it’s essential to discover the DNS tackle of an internet site known as cyberciti.biz from the command line? Merely sort the next dig command:
dig ns website-domain
dig ns google.com
dig ns cyberciti.biz
Linux Unix find a website's DNS (name server) address
The default is to print the reply in a verbose format. Nevertheless, one can get a terse reply by passing the +quick as follows:
dig +quick ns cyberciti.biz
Pattern outputs:

fay.ns.cloudflare.com.
clay.ns.cloudflare.com.

One can use the identical instructions to print precise IP tackle of identify servers:
dig +quick a fay.ns.cloudflare.com.
173.245.58.115
dig +quick aaaa fay.ns.cloudflare.com.
2400:cb00:2049:1::adf5:3a73

How one can search for the delegation path from the foundation DNS/identify servers

Tracing is disabled by default. When tracing is enabled, dig makes iterative queries to resolve the identify being seemed up. It should observe referrals from the foundation servers, displaying the reply from every server that was used to resolve the lookup. If @server can also be specified, it impacts solely the preliminary question for the foundation zone identify servers. For instance:
dig +hint cyberciti.biz
dig +hint cyberciti.biz @eight.eight.eight.eight
Pattern outputs:

; <> DiG 9.11.Four-P2-RedHat-9.11.Four-9.P2.el7 <> +hint cyberciti.biz @eight.eight.eight.eight
;; world choices: +cmd
. 7313 IN NS a.root-servers.internet.
. 7313 IN NS b.root-servers.internet.
. 7313 IN NS c.root-servers.internet.
. 7313 IN NS d.root-servers.internet.
. 7313 IN NS e.root-servers.internet.
. 7313 IN NS f.root-servers.internet.
. 7313 IN NS g.root-servers.internet.
. 7313 IN NS h.root-servers.internet.
. 7313 IN NS i.root-servers.internet.
. 7313 IN NS j.root-servers.internet.
. 7313 IN NS ok.root-servers.internet.
. 7313 IN NS l.root-servers.internet.
. 7313 IN NS m.root-servers.internet.
. 7313 IN RRSIG NS eight zero 518400 20191115050000 20191102040000 22545 . Z14B+vD/MKz0X1UBwu04kzwQNajhg1AflK7j5Jvd9NZac1HZ/M9xdSGN F85s/5ITxEiWWeiBhRghy9PkdOmN3ZzhzS5E8ZeIibm0DdIse+qlPNas sfmNZEsIRbXEOER98eQ+Ieb0hjOlu7Y5l6Mo3dnuyE203IxXZTmtD9QH zMRbX8gOrBnee1XYe7kxw+S2AN6BBeRHNFPHuT5nBCwWQlDVFao2ICrV 0oU97YJE7fwDNzyBgb89G++GjVKhQoM/0Bmr4D2vUAqCz7Nt9Gb28TOt A+FpA6Ax9MpjZSCH8dOvz1nytjWfRMYyF5LVGEN6oPW6BKX2fWrfhIC4 TWIfWA==
;; Acquired 525 bytes from eight.eight.eight.eight#53(eight.eight.eight.eight) in 7 ms
 
biz. 172800 IN NS a.gtld.biz.
biz. 172800 IN NS b.gtld.biz.
biz. 172800 IN NS c.gtld.biz.
biz. 172800 IN NS e.gtld.biz.
biz. 172800 IN NS f.gtld.biz.
biz. 172800 IN NS ok.gtld.biz.
biz. 86400 IN DS 12385 eight 2 AE03B95863B999FC84B725DF5C903511FF96D53825F0454CE6880987 E96F5D20
biz. 86400 IN DS 12385 eight 1 E917523077754FB03308402D76144EAF0D4F6778
biz. 86400 IN DS 28450 eight 1 D9C2F912C657E4005CF0C13BA55C5AAA291AEF56
biz. 86400 IN DS 28450 eight 2 403F234609C56B3A221BC4CFB694948AB5DDF4A26AE17439BF1279CF C5CF21AB
biz. 86400 IN RRSIG DS eight 1 86400 20191116050000 20191103040000 22545 . i3J7qFB7/r4bUrZgZg8OcjcfguFXlSWJbgSzWJyFb+04qKWOFks4HwI9 uYKbr35anabpF2DfHlwKurmO/0HN/7uRC5da5VPMild2gUiJmXKjcN73 Gx/8F3zo3fVAjNxi+/JWicUgpCAY4iKfDq21YNV1CZopAn7QPw3+OUoo Haewp4MEF0T+omyMirn1RxBbK6+P2FNFxgGysJsUUNt1yz7Ax2tR/otY DllMPu6sLhY8MvThBVXmZCrpVTXmd/+VUlim8m/BUz/E7fumnrrraFam Khf3skCrfuLlHgemOz/pugUx8qnJ3BtsQKQzsL2cAY34I3g0kA7ckC6c moAEFA==
;; Acquired 778 bytes from 193.zero.14.129#53(ok.root-servers.internet) in 191 ms
 
cyberciti.biz. 7200 IN NS clay.ns.cloudflare.com.
cyberciti.biz. 7200 IN NS fay.ns.cloudflare.com.
9ivsa0gimv18nm4si1tkf2r78navcdut.biz. 86400 IN NSEC3 1 1 1 E3C15F5F 9J0FSB5H124LGRSLHHGR0RDCP0RTEF1N NS SOA RRSIG DNSKEY NSEC3PARAM
9ivsa0gimv18nm4si1tkf2r78navcdut.biz. 86400 IN RRSIG NSEC3 eight 2 86400 20191203045447 20191103042210 24963 biz. wkpoTyfFje28GBCJSTzgpV3Cr0Kbknw0n+WTv8/CpXUxG5CiKAfb2qmA KRClCT5oBelSA0FE1GekCjiEWFStCrnW2JOsLsSNWA3QKf8oWPhtBjLq Ij1+YEBFDVC67b0Kdeg6ndM3OZVlb7q9Xvi3n1PIUHS3fbuNF1MyYqMu V10e1Zfn8elyC4fEtJ6YmUhsm4oxHKkhk1NIUG8FQNg0YQ==
91phatls11fhcqsue6s1v6pi3rvttmnn.biz. 86400 IN NSEC3 1 1 1 E3C15F5F 91U8FRHJGMNHK5TPH2253L6LFIU8HM5A NS DS RRSIG
91phatls11fhcqsue6s1v6pi3rvttmnn.biz. 86400 IN RRSIG NSEC3 eight 2 86400 20191127183100 20191028181200 24963 biz. YbrRM0lxpgF4rhRe4rfDAMrRq4ifiM9MkIlPuV0XYEY9NpyUNAc19xoi MRqbyUl56YlKiIlrhZPzUedDdkObt3Zz4mXI5tz5DhNPE6t4l4tNEjzH hnagx8TeCLI19S3GBE3tFzlF5zC/1ccOrl2bkYIMBHXssLkJwEGaqX9B VTRGAS1JDOxE0bXG2iEZtWotzu3Jgv+zeXG0HnCALyLFmQ==
;; Acquired 653 bytes from 156.154.126.65#53(e.gtld.biz) in 30 ms
 
cyberciti.biz. 300 IN A 104.20.186.5
cyberciti.biz. 300 IN A 104.20.187.5
;; Acquired 74 bytes from 173.245.58.115#53(fay.ns.cloudflare.com) in 65 ms

; <> DiG 9.11.Four-P2-RedHat-9.11.Four-9.P2.el7 <> +hint cyberciti.biz @eight.eight.eight.eight
;; world choices: +cmd
. 7313 IN NS a.root-servers.internet.
. 7313 IN NS b.root-servers.internet.
. 7313 IN NS c.root-servers.internet.
. 7313 IN NS d.root-servers.internet.
. 7313 IN NS e.root-servers.internet.
. 7313 IN NS f.root-servers.internet.
. 7313 IN NS g.root-servers.internet.
. 7313 IN NS h.root-servers.internet.
. 7313 IN NS i.root-servers.internet.
. 7313 IN NS j.root-servers.internet.
. 7313 IN NS ok.root-servers.internet.
. 7313 IN NS l.root-servers.internet.
. 7313 IN NS m.root-servers.internet.
. 7313 IN RRSIG NS eight zero 518400 20191115050000 20191102040000 22545 . Z14B+vD/MKz0X1UBwu04kzwQNajhg1AflK7j5Jvd9NZac1HZ/M9xdSGN F85s/5ITxEiWWeiBhRghy9PkdOmN3ZzhzS5E8ZeIibm0DdIse+qlPNas sfmNZEsIRbXEOER98eQ+Ieb0hjOlu7Y5l6Mo3dnuyE203IxXZTmtD9QH zMRbX8gOrBnee1XYe7kxw+S2AN6BBeRHNFPHuT5nBCwWQlDVFao2ICrV 0oU97YJE7fwDNzyBgb89G++GjVKhQoM/0Bmr4D2vUAqCz7Nt9Gb28TOt A+FpA6Ax9MpjZSCH8dOvz1nytjWfRMYyF5LVGEN6oPW6BKX2fWrfhIC4 TWIfWA==
;; Acquired 525 bytes from eight.eight.eight.eight#53(eight.eight.eight.eight) in 7 ms biz. 172800 IN NS a.gtld.biz.
biz. 172800 IN NS b.gtld.biz.
biz. 172800 IN NS c.gtld.biz.
biz. 172800 IN NS e.gtld.biz.
biz. 172800 IN NS f.gtld.biz.
biz. 172800 IN NS ok.gtld.biz.
biz. 86400 IN DS 12385 eight 2 AE03B95863B999FC84B725DF5C903511FF96D53825F0454CE6880987 E96F5D20
biz. 86400 IN DS 12385 eight 1 E917523077754FB03308402D76144EAF0D4F6778
biz. 86400 IN DS 28450 eight 1 D9C2F912C657E4005CF0C13BA55C5AAA291AEF56
biz. 86400 IN DS 28450 eight 2 403F234609C56B3A221BC4CFB694948AB5DDF4A26AE17439BF1279CF C5CF21AB
biz. 86400 IN RRSIG DS eight 1 86400 20191116050000 20191103040000 22545 . i3J7qFB7/r4bUrZgZg8OcjcfguFXlSWJbgSzWJyFb+04qKWOFks4HwI9 uYKbr35anabpF2DfHlwKurmO/0HN/7uRC5da5VPMild2gUiJmXKjcN73 Gx/8F3zo3fVAjNxi+/JWicUgpCAY4iKfDq21YNV1CZopAn7QPw3+OUoo Haewp4MEF0T+omyMirn1RxBbK6+P2FNFxgGysJsUUNt1yz7Ax2tR/otY DllMPu6sLhY8MvThBVXmZCrpVTXmd/+VUlim8m/BUz/E7fumnrrraFam Khf3skCrfuLlHgemOz/pugUx8qnJ3BtsQKQzsL2cAY34I3g0kA7ckC6c moAEFA==
;; Acquired 778 bytes from 193.zero.14.129#53(ok.root-servers.internet) in 191 ms cyberciti.biz. 7200 IN NS clay.ns.cloudflare.com.
cyberciti.biz. 7200 IN NS fay.ns.cloudflare.com.
9ivsa0gimv18nm4si1tkf2r78navcdut.biz. 86400 IN NSEC3 1 1 1 E3C15F5F 9J0FSB5H124LGRSLHHGR0RDCP0RTEF1N NS SOA RRSIG DNSKEY NSEC3PARAM
9ivsa0gimv18nm4si1tkf2r78navcdut.biz. 86400 IN RRSIG NSEC3 eight 2 86400 20191203045447 20191103042210 24963 biz. wkpoTyfFje28GBCJSTzgpV3Cr0Kbknw0n+WTv8/CpXUxG5CiKAfb2qmA KRClCT5oBelSA0FE1GekCjiEWFStCrnW2JOsLsSNWA3QKf8oWPhtBjLq Ij1+YEBFDVC67b0Kdeg6ndM3OZVlb7q9Xvi3n1PIUHS3fbuNF1MyYqMu V10e1Zfn8elyC4fEtJ6YmUhsm4oxHKkhk1NIUG8FQNg0YQ==
91phatls11fhcqsue6s1v6pi3rvttmnn.biz. 86400 IN NSEC3 1 1 1 E3C15F5F 91U8FRHJGMNHK5TPH2253L6LFIU8HM5A NS DS RRSIG
91phatls11fhcqsue6s1v6pi3rvttmnn.biz. 86400 IN RRSIG NSEC3 eight 2 86400 20191127183100 20191028181200 24963 biz. YbrRM0lxpgF4rhRe4rfDAMrRq4ifiM9MkIlPuV0XYEY9NpyUNAc19xoi MRqbyUl56YlKiIlrhZPzUedDdkObt3Zz4mXI5tz5DhNPE6t4l4tNEjzH hnagx8TeCLI19S3GBE3tFzlF5zC/1ccOrl2bkYIMBHXssLkJwEGaqX9B VTRGAS1JDOxE0bXG2iEZtWotzu3Jgv+zeXG0HnCALyLFmQ==
;; Acquired 653 bytes from 156.154.126.65#53(e.gtld.biz) in 30 ms cyberciti.biz. 300 IN A 104.20.186.5
cyberciti.biz. 300 IN A 104.20.187.5
;; Acquired 74 bytes from 173.245.58.115#53(fay.ns.cloudflare.com) in 65 ms

Discover DNS tackle of an internet site utilizing host command

The syntax is as follows for the host command:
host -t ns domain-name-here
host -t ns google.com
host -t ns cyberciti.biz
Pattern outputs:

cyberciti.biz identify server fay.ns.cloudflare.com.
cyberciti.biz identify server clay.ns.cloudflare.com.

Once more use host to show IP tackle for clay.ns.cloudflare.com nameserver:
host -t a clay.ns.cloudflare.com
clay.ns.cloudflare.com has tackle 173.245.59.88
host -t aaaa clay.ns.cloudflare.com
clay.ns.cloudflare.com has IPv6 tackle 2400:cb00:2049:1::adf5:3b58

A observe about Home windows customers

You need to use the nslookup command to point out details about Area Title System (DNS) infrastructure on Home windows desktop or server. Go to Begin and kind cmd in search discipline to open the command immediate. Sort nslookup and hit Enter as follows:
nslookup domain-name
nslookup cyberciti.biz
Pattern outputs:

Server: 127.zero.zero.53
Tackle: 127.zero.zero.53#53

Non-authoritative reply:
Title: www.cyberciti.biz
Tackle: 104.20.187.5
Title: www.cyberciti.biz
Tackle: 104.20.186.5
Title: www.cyberciti.biz
Tackle: 2606:4700:10::6814:bb05
Title: www.cyberciti.biz
Tackle: 2606:4700:10::6814:ba05

After all one print ns sort as follows:
nslookup
> set q=ns
> cyberciti.biz
Use Windows or Unix nslookup command for DNS

A listing of DNS file sorts

Generally used file typesDescriptionExamplesAHost addresshost -t a nixcraft.comAAAAIPv6 host addresshost -t aaaa nixcraft.comALIASAuto resolved aliashost -t alias portal2.cyberciti.bizCNAMECanonical identify for an aliashost -t cname feeds.cyberciti.bizMXMail eXchangehost -t mx google.comNSName Serverhost -t ns nixcraft.comPTRPointerhost -t ptr 216.58.200.147SOAStart Of Authorityhost -t soa nixcraft.comSRVLocation of servicehost -t srv server1.cyberciti.bizTXTDescriptive texthost -t txt nixcraft.com

You need to use file sorts with nslookup, dig and host instructions as follows:
$ host -t TYPE domain-name-here
$ dig TYPE domain-name-here
$ nslookup
> set q=TYPE
> dommain-name-here

Conclusion

You discovered find out how to use dig, nslookup, and host instructions to seek out data that you need to use to diagnose Area Title System (DNS) infrastructure, together with mx, ns, and different information for a given web site or DNS tackle.

Posted by: Vivek Gite

The writer is the creator of nixCraft and a seasoned sysadmin, DevOps engineer, and a coach for the Linux working system/Unix shell scripting. Get the newest tutorials on SysAdmin, Linux/Unix and open supply matters through RSS/XML feed or weekly e mail e-newsletter.

Source link

Related Articles

Leave a Reply

Back to top button