Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
311 views
in Technique[技术] by (71.8m points)

whois - Checking domain name availability with DNS records

How accurately can a domain name's availibility be determined by checking for the existence of NS or SOA (Start of Authority) records?

If not, how can I determine this as accurately as possible without resorting to WHOIS? For example, is it worth checking for MX records if no NS records exist?

I am specifically interested in .co.za domains, but the only official, fool-proof way to check availability in the .co.za namespace is to use http://co.za/whois.shtml, which limits consecutive checking by IP address.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

The only 100% reliable way to check for domain availability is to query the registrar's database. I wouldn't trust whois.

You can use DNS to get an estimate. Instead of looking for an SOA record, I would just look to see if anything at all is listed with the TLD name server. dig is a good tool for this (runs on Windows, too), although I guess you could use nslookup too. For example:

dig co.za. NS

will provide a list of the name servers for .co.za. One of those servers is ns0.is.co.za.

Next, query that server directly to see if they have anything listed for your domain of interest:

dig ibm.co.za @ns0.is.co.za

That query returns NS records, but no SOA record since SOA records are provided by the domain's name server (which may or may not be online). The NS records indicate the domain name is in use.

The reason for going direct is that it's usually much faster than relying on recursive queries from your local name server.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...