Domains and DNS
How to check if a domain name is available
Run a check on domain name availability with a Whois or RDAP lookup, then read the status codes that show when a deleted domain can be registered again.
· Mateo Cardenas
You can do a DNS lookup on Windows with the nslookup command-line tool or the Resolve-DnsName PowerShell cmdlet.1, 2, sources 1 and 2 Other options are the BIND 9 dig and host utilities, which perform DNS lookups, and the Google Admin Toolbox Dig (DNS lookup) page.3, 4, 5, sources 3, 4 and 5
A resolver is a program that extracts information from name servers in response to client requests.6, source 6 A resolver performs queries for a name, type, and class, and receives responses.6, source 6 A stub resolver is a resolver that cannot perform all resolution itself.6, source 6 Stub resolvers generally depend on a recursive resolver to undertake the actual resolution function.6, source 6
A server in recursive mode either answers a query from a local cache or sends queries to other servers to get the final answer to the original query.6, source 6 A recursive resolver is generally expected to cache the answers it receives, although some recursive resolvers might not cache.6, source 6 Negative caching is the storage of knowledge that something does not exist, cannot give an answer, or does not give an answer.6, source 6
An authoritative server knows the content of a DNS zone from local knowledge, so it can answer queries about that zone without querying other servers.6, source 6 An authoritative server is named in the NS (name server) record of a zone.6, source 6
A recursive query is a query with the Recursion Desired (RD) bit set to 1 in the header.6, source 6 A non-recursive query is a query with the Recursion Desired (RD) bit set to 0 in the header.6, source 6 When the RD bit is set in a query, it directs the name server to pursue the query recursively, and recursive query support is optional.7, source 7
In RFC 1035, an A record is a host address.7, source 7 A and AAAA records in Cloudflare map a domain name to one or multiple IPv4 or IPv6 addresses.8, source 8 In RFC 1035, an NS record is an authoritative name server.7, source 7 A nameserver (NS) record in Cloudflare indicates which server should be used for authoritative DNS.8, source 8
In RFC 1035, a CNAME record is the canonical name for an alias.7, source 7 CNAME records in Cloudflare map a domain name to another (canonical) domain name.8, source 8 In RFC 1035, an SOA record marks the start of a zone of authority.7, source 7 A start of authority (SOA) record in Cloudflare stores information about a domain, such as the admin email address and when the domain was last updated.8, source 8
In RFC 1035, a PTR record is a domain name pointer, and an MX record is a mail exchange.7, source 7 In Cloudflare, a mail exchange (MX) record is required to deliver email to a mail server.8, source 8
In RFC 1035, a TXT record holds text strings.7, source 7 A text (TXT) record in Cloudflare lets you enter text into the DNS system.8, source 8 At Cloudflare, TXT records are most commonly used to demonstrate domain ownership before SSL/TLS certificates are issued for a domain.8, source 8
A Certificate Authority Authorization (CAA) record in Cloudflare specifies which Certificate Authorities (CAs) are allowed to issue certificates for a domain.8, source 8 A service record (SRV) in Cloudflare specifies a host and port for specific services such as voice over IP (VOIP) and instant messaging.8, source 8
The nslookup command applies to Windows 11 and Windows 10.1, source 1 On Windows, nslookup displays information that you can use to diagnose Domain Name System (DNS) infrastructure.1, source 1 The nslookup command-line tool has two modes: interactive and noninteractive.1, source 1 Use noninteractive mode to look up only a single piece of data, or when you use nslookup in scripts, command lines, or PowerShell.1, source 1
In nslookup noninteractive mode, the first command line parameter is the name or IP address of the computer to look up.1, source 1 The second parameter is the name or IP address of a DNS name server, and if you omit it, nslookup uses the default DNS name server.1, source 1 The command nslookup mydomain.com 1.1.1.1 looks up the IP addresses for the domain name mydomain.com on the DNS name server at 1.1.1.1.1, source 1 The command nslookup 4.4.4.4 looks up the domain name for the IP address 4.4.4.4 on the default DNS name server.1, source 1
The command nslookup -type=AAAA mydomain.com returns only IPv6 record types.1, source 1 To enter nslookup interactive mode, type a hyphen (-) instead of the first parameter in the nslookup command line.1, source 1 In nslookup interactive mode, entering a name such as mydomain.com at the prompt returns its IP addresses.1, source 1 At the interactive prompt, set type=HINFO sets the query resource record type to HINFO, and server 4.4.4.4 changes the default DNS name server to 4.4.4.4.1, source 1
The Resolve-DnsName PowerShell cmdlet performs a DNS query for the specified name.2, source 2 Resolve-DnsName is functionally similar to the nslookup tool.2, source 2
The command Resolve-DnsName -Name www.bing.com resolves a name using the default options.2, source 2 The command Resolve-DnsName -Name www.bing.com -Server 10.0.0.1 resolves a name against the DNS server at 10.0.0.1.2, source 2 The command Resolve-DnsName -Name www.bing.com -Type A queries for A type records for the name www.bing.com.2, source 2
The Resolve-DnsName syntax includes the -Server, -DnsOnly and -CacheOnly parameters, among others.2, source 2 In Resolve-DnsName, the -CacheOnly switch resolves a query using only the local cache.2, source 2 The -NoRecursion switch instructs the server not to use recursion when resolving a query.2, source 2
The BIND 9 dig utility is a flexible tool for interrogating DNS name servers.3, source 3 dig performs DNS lookups and displays the answers returned from the name servers that were queried.3, source 3
A typical dig invocation looks like dig @server name type.3, source 3 In dig, server is the name or IP address of the name server to query.3, source 3 In dig, name is the name of the resource record that is to be looked up.3, source 3 In dig, type indicates what type of query is required, such as ANY, A, MX or SIG.3, source 3
Leaving out the type argument means dig performs a lookup for an A record.3, source 3 Supplying no server argument directs dig to consult /etc/resolv.conf and query the name server at an address it finds there.3, source 3 The dig -x option sets simplified reverse lookups, for mapping addresses to names.3, source 3 The dig +short option toggles whether a terse answer is provided, and the default is to print the answer in a verbose form.3, source 3
The dig +all and +noall options set or clear all display flags.3, source 3 The dig +ttlid option displays the TTL when printing a record.3, source 3 The dig +trace option traces the delegation path from the root name servers for the name being looked up, and tracing is disabled by default.3, source 3 With dig +trace, dig follows referrals from the root servers and shows the answer from each server used to resolve the lookup.3, source 3
With the dig +nssearch option, dig attempts to find the authoritative name servers for the zone containing the name being looked up and display the SOA record that each name server has for the zone.3, source 3 dig normally sends recursive queries.3, source 3 The BIND 9 implementation of dig allows multiple lookups to be issued from one command line.3, source 3 The dig -f option sets batch mode, in which dig reads a list of lookup requests from a file.3, source 3
The BIND 9 host utility is a simple utility for performing DNS lookups.4, source 4 host is normally used to convert names to IP addresses and vice versa.4, source 4 host takes an optional server argument, the name or IP address of the name server to query instead of the servers listed in /etc/resolv.conf.4, source 4 When no query type is specified, host looks for A, AAAA, and MX records by default.4, source 4
The host -t option sets the query type, which can be any recognized query type such as CNAME, NS, SOA, TXT, DNSKEY or AXFR.4, source 4 The host -r option makes a non-recursive query by clearing the RD (recursion desired) bit in the query.4, source 4
Google Admin Toolbox has a Dig (DNS lookup) page for making DNS lookups.5, source 5 To make a DNS lookup on the Google Admin Toolbox Dig page, enter the domain name; a trailing dot is appended automatically.5, source 5 The Google Admin Toolbox Dig page has a Name field and a Raw View option.5, source 5
To create, edit or delete a DNS record in the Cloudflare dashboard, you start at the DNS Records page.9, source 9 To create a DNS record in the Cloudflare dashboard, select Add record and then choose a record Type.9, source 9 In the Cloudflare dashboard, the required fields for a new DNS record vary per record.9, source 9
In Cloudflare, you edit a DNS record by selecting Edit on a specific record, making changes and selecting Save.9, source 9 In Cloudflare, you delete a DNS record by selecting Edit on it, selecting Delete, and selecting Delete again to confirm.9, source 9 The TTL field in the Cloudflare dashboard controls how long each record is valid.9, source 9
If a hosting partner added your domain to Cloudflare, you manage your DNS records through the hosting partner.9, source 9 In Cloudflare, if your hosting provider or origin IP address changes, you update the Content value of the relevant DNS records, usually A or AAAA records.9, source 9 If you are not sure which IP address to use, refer to your hosting provider's documentation.9, source 9
The nslookup error "timed out" means the server did not respond to a request after a certain amount of time and a certain number of retries.1, source 1 The nslookup error "No response from server" means no DNS name server is running on the server computer.1, source 1 The nslookup error "No records" means the DNS name server has no resource records of the current query type for the computer, although the computer name is valid.1, source 1
The nslookup error "Nonexistent domain" means the computer or DNS domain name doesn't exist.1, source 1 The nslookup error "Server failure" means the DNS name server found an internal inconsistency in its database and could not return a valid answer.1, source 1 In RFC 1035, response code 2 is Server failure, meaning the name server was unable to process the query due to a problem with the name server.7, source 7
In RFC 1035, response code 3 is Name Error, meaningful only for responses from an authoritative name server, and it signifies that the domain name referenced in the query does not exist.7, source 7 RFC 2308 established NXDOMAIN as a synonym for the Name Error response code.6, source 6 dig return code 0 means a DNS response was received, including NXDOMAIN status.3, source 3 dig return code 9 means there was no reply from the server.3, source 3
DNS_PROBE_FINISHED_NXDOMAIN indicates that the DNS lookup completed and the result was that the domain does not exist.10, source 10 DNS_PROBE_FINISHED means the DNS probe ran to completion, and NXDOMAIN stands for non-existent domain.10, source 10 DNS_PROBE_FINISHED_NXDOMAIN can come from network or local DNS issues, but it might also point to an issue with your DNS records in Cloudflare.10, source 10
With the correct records set up in Cloudflare, make sure they also point to the correct origin IP address.10, source 10
In Cloudflare, the TTL controls how long DNS resolvers should cache a response before revalidating it.8, source 8 Some servers are known to ignore the TTL on some RRsets.6, source 6 An RRset can be flushed from a cache before the end of its TTL interval.6, source 6
Query the record type you want with nslookup, Resolve-DnsName, dig or host. On Windows, nslookup -type=AAAA returns IPv6 records and Resolve-DnsName -Type A queries A records. With BIND 9, dig takes a type argument and host takes the -t option.
It is a utility, such as dig or host, for DNS lookups. The BIND 9 dig utility interrogates DNS name servers and displays the answers returned. On Windows, the nslookup command-line tool and the Resolve-DnsName cmdlet perform lookups. The Google Admin Toolbox has a Dig page for making DNS lookups.
Yes, BIND 9 dig can issue multiple lookups from one command line. Its -f option sets batch mode, in which dig reads a list of lookup requests from a file.
It means the lookup completed and the domain does not exist. The DNS probe ran to completion, and NXDOMAIN stands for non-existent domain. It can come from network or local DNS issues, but it might also point to an issue with your DNS records in Cloudflare.
Every fact on this page comes from one of these, checked before it goes live.
Domains and DNS
Run a check on domain name availability with a Whois or RDAP lookup, then read the status codes that show when a deleted domain can be registered again.
· Mateo Cardenas
Domains and DNS
Pick a domain name whose labels meet the character and length rules, then check its top-level domain and whether it could infringe someone else's rights.
· Mateo Cardenas
Domains and DNS
Learn how to register a domain name: choose a registrar, give accurate contact details, and understand renewal, free domain and transfer rules.
· Mateo Cardenas
Domains and DNS
Run a WHOIS lookup on a domain for free with ICANN's Registration Data Lookup Tool, and learn why some owner details can be private or removed.
· Mateo Cardenas