Questions tagged [domain-name-system]

The Domain Name System, usually referred to by the acronym DNS, is a hierarchical, distributed database where the keys are domain names. Questions involving publicly accessible domains should include the real, Fully Qualified Domain Name (FQDN)

DNS is the Domain Name System, a hierarchical, distributed database where the keys are domain names.

The primary references are:

  • RFC 1034 - Domain Names - Concepts and Facilities
  • RFC 1035 - Domain Names - Implementation and Specification

These documents collectively form STD 13. RFC 2181 is a frequently cited reference for STD 13 that addresses some of the more confusing areas of operation.

The most common record types found in the DNS are:

  • "A" records - the mapping from a domain name to an IPv4 address
  • "AAAA" records - the mapping from a domain name to an IPv6 address
  • "MX" records - the mapping from a domain name to the host name of an SMTP server
  • "NS" records - used to delegate a portion of the hierarchy to specific DNS servers
  • "PTR" records - typically used (via in-addr.arpa.) to map an IPv4 address back to a domain name
  • "CNAME" records - used to alias a domain name to its canonical version

DNS packets are conventionally transported over UDP and TCP port 53. UDP is more commonly used, but larger DNS responses and zone transfers require TCP. See RFC 5966.

This Wikipedia article provides an approachable introduction to DNS.

11973 questions
299
votes
14 answers

What's the command-line utility in Windows to do a reverse DNS look-up?

Is there a built-in command line tool that will do reverse DNS look-ups in Windows? I.e., something like w.x.y.z => mycomputername I've tried: nslookup: seems to be forward look-up only. host: doesn't exist dig: also doesn't exist. I…
251
votes
2 answers

Linux command to inspect TXT records of a domain

Is there a linux shell command that I can use to inspect the TXT records of a domain?
John
  • 7,153
  • 22
  • 61
  • 86
238
votes
10 answers

List all DNS records in a domain using dig?

My company runs an internal DNS for mycompany.example There is a machine on the network that I need to find, but I’ve forgotten its name. If I could see a list, it would probably jog my memory. How can I list all of the domain records for…
Runcible
  • 2,955
  • 3
  • 22
  • 15
227
votes
3 answers

How to include multiple domains in an spf TXT Record

I am looking to setup a TXT spf record that has 2 included domains... individually: v=spf1 include:_spf.google.com ~all and v=spf1 include:otherdomain.com ~all What is the proper way of combining them into a single item?
tgriesser
  • 2,662
  • 2
  • 16
  • 10
208
votes
8 answers

Setting the hostname: FQDN or short name?

I've noticed that the "preferred" method of setting the system hostname is fundamentally different between Red Hat/CentOS and Debian/Ubuntu systems. CentOS documentation and the RHEL deployment guide say the hostname should be the…
Cakemox
  • 24,141
  • 6
  • 41
  • 67
186
votes
5 answers

What is a glue record?

This is a Canonical Question about DNS glue records. What exactly (but briefly) is a DNS glue record? Why are they needed and how do they work?
LanceBaynes
  • 2,907
  • 9
  • 27
  • 31
180
votes
16 answers

Why is DNS failover not recommended?

From reading, it seems like DNS failover is not recommended just because DNS wasn't designed for it. But if you have two webservers on different subnets hosting redundant content, what other methods are there to ensure that all traffic gets routed…
Lin
  • 2,869
  • 6
  • 26
  • 25
171
votes
10 answers

Top level domain/domain suffix for private network?

At our office, we have a local area network with a purely internal DNS setup, on which clients all named as whatever.lan. I also have a VMware environment, and on the virtual-machine-only network, I name the virtual machines whatever.vm. Currently,…
Otto
  • 1,941
  • 3
  • 16
  • 11
166
votes
5 answers

DNS - NSLOOKUP what is the meaning of the non-authoritative answer?

For some domains nslookup gives me a Non-authoritative answer section. What does this mean? Got answer: HEADER: opcode = QUERY, id = 3, rcode = NXDOMAIN header flags: response, want recursion, recursion avail. questions…
mahen3d
  • 3,905
  • 12
  • 34
  • 55
153
votes
3 answers

Why can't a CNAME record be used at the apex (aka root) of a domain?

This is a Canonical Question about CNAMEs at the apices (or roots) of zones It's relatively common knowledge that CNAME records at the apex of a domain are a taboo practice. Example: example.com. IN CNAME ithurts.example.net. In a best case…
Andrew B
  • 31,858
  • 12
  • 90
  • 128
146
votes
5 answers

Force dig to resolve without using cache

I'm wondering if there is a way to query a DNS server and bypass caching (with dig). Often I change a zone on the DNS server and I want to check if it resolves correctly from my workstation. But since the server caches resolved requests, I often get…
Daniel
  • 2,877
  • 5
  • 20
  • 24
138
votes
3 answers

What's the meaning of '@' in a DNS zone file?

I have the following data in my DNS zone file for my domain: $ORIGIN mydomain.com. @ IN A 208.X.Y.Z mail IN A 208.X.Y.Z ... etc.. What does the @ line mean? I know what an A record is.. but a host with an ampersand at…
Pure.Krome
  • 6,338
  • 17
  • 72
  • 86
127
votes
4 answers

How can I see Time-To-Live (TTL) for a DNS record?

I would like to see the Time-To-Live (TTL) value for a CNAME record. I have access to dig (on Apple Mac OS X), which gives me an answer like this: % dig host.example.gov <*SNIP*> ;; ANSWER SECTION: host.example.gov. 43200 IN CNAME …
Stefan Lasiewski
  • 22,949
  • 38
  • 129
  • 184
116
votes
4 answers

What type of DNS record is needed to make a subdomain?

I'm making a website, and I need a sub-domain. I need to add the new part to my website, but I don't know which type of DNS record to add in the DNS console to point to this new site. Is it A or CNAME?
Keavon
  • 1,261
  • 2
  • 8
  • 7
105
votes
13 answers

What's the reverse DNS command line utility?

What's the command to find the name of a computer given its IP address? I always forget what this command is, but I know it exists in Windows and I assume it exists on the *nix command-line.
1
2 3
99 100