The existence of domain names through "dig"

Is it possible to check a domain name for its existence by checking the output of "dig"? Inside the binding sources, I found these constants:

0 DNS_R_NOEROR
1 DNS_R_FORMERR
2 DNS_R_SERVFAIL
3 DNS_R_NXDOMAIN
4 DNS_R_NOTIMP
5 DNS_R_REFUSED
6 DNS_R_YXDOMAIN
7 DNS_R_YXRRSET
8 DNS_R_NXRRSET
9 DNS_R_NOTAUTH
10 DNS_R_NOTZONE
16 DNS_R_BADVERS

<RCODE 11>     # 11 has no macro
<RCODE 12>     # 12 has no macro
<RCODE 13>     # 13 has no macro
<RCODE 14>     # 14 has no macro
<RCODE 15>     # 15 has no macro

In my opinion, NOERROR and SERVFAIL means that the host name exists (although this does not mean that ip is associated with it). NXDOMAIN means that it absolutely does not exist.

I prefer not to use whois because it is rather slow. dig is much faster since I just need to be sure that the hostname does not exist yet.

Can someone highlight my assumptions and other macros?

thank

+5
source share
2 answers

, , - , TLD. , , :

$ dig asdfasdfasdfxvyxv123.de.com A +short 
91.213.214.122

$ whois -h whois.centralnic.com asdfasdfasdfxvyxv123.de.com
DOMAIN NOT FOUND

whois - / , , (.. EPP)

+3

, . , Dig , , , , .

- WHOIS.

+1

All Articles