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.

12242 questions
103
votes
8 answers

Is a wildcard CNAME DNS record valid?

I know it's valid to have a DNS A record that's a wildcard (e.g. *.mysite.com). Is it possible/valid/advised to have a wildcard CNAME record?
Ben Mills
  • 1,163
  • 2
  • 8
  • 9
102
votes
6 answers

Why can't MX records point to an IP address?

I understand you should not point a MX record at an IP address directly, but should instead point it to an A record, which, in turns, points to the IP address of your mail server. But, in principle, why is this required?
dayuloli
  • 1,253
  • 2
  • 11
  • 19
100
votes
4 answers

How does ServerName and ServerAlias work?

It's the following part of a virtual host config that I need further clarification on: # Admin email, Server Name (domain name), and any aliases ServerAdmin example@example.com ServerName 141.29.495.999 ServerAlias…
njp
  • 1,102
  • 2
  • 8
  • 7
98
votes
21 answers

Should we host our own nameservers?

This is a Canonical Question about whether to outsource DNS resolution for ones own domains I currently have my ISP providing DNS for my domain, but they impose limitations on adding records. Therefore, I am thinking about running my own DNS. Do…
Saif Khan
  • 1,945
  • 2
  • 20
  • 25
95
votes
2 answers

Should CNAME Be Used For Subdomains?

I manage multiple websites that currently have the following DNS configuration: example.com - A Record - Production Server IP test.example.com - A Record - Test Server IP www.example.com - CNAME - example.com beta.example.com - CNAME -…
Joseph Sturtevant
  • 1,274
  • 3
  • 15
  • 17
89
votes
4 answers

Vagrant / VirtualBox DNS 10.0.2.3 not working

I am running a fresh install of Linux Mint Nadia (14). I am following the instructions on Vagrant Getting Started but have gotten stuck on the Provisioning. It seems the Vagrant box cannot connect outside and so I can't install anything using either…
Rudolf Vavruch
  • 1,295
  • 2
  • 11
  • 16
88
votes
3 answers

Is a CNAME to CNAME chain allowed?

Is it allowed in DNS to have a CNAME record that points to another CNAME record? The reason we need this is that we have a hostname that we want to be looked up to the IP address of our web server computer. We also have another web server computer…
Erik Sjölund
  • 2,115
  • 5
  • 22
  • 27
86
votes
3 answers

Multiple TXT fields for same subdomain

I would like to understand if multiple TXT records for the same subdomain are ok or could lead to issues. In particular, we have the requirement for one SPF record and one Google Domain Verification record on the root domain. In AWS Route 53 they…
chrisvdb
  • 1,279
  • 2
  • 12
  • 15
82
votes
2 answers

How to configure a Windows machine to allow file sharing with a DNS alias

What process is necessary to configure a Windows environment to allow me to use DNS CNAME to reference servers? I want to do this so that I can name my servers something like SRV001, but still have \\file point to that server, so when SRV002…
Michael Ferrante
  • 1,641
  • 1
  • 13
  • 10
80
votes
11 answers

Multiple data centers and HTTP traffic: DNS Round Robin is the ONLY way to assure instant fail-over?

Multiple A records pointing to the same domain seem to be used almost exclusively to implement DNS Round Robin as a cheap load balancing technique. The usual warning against DNS RR is that it is not good for high availability. When 1 IP goes down…
80
votes
6 answers

Do SPF Records For Primary Domain apply to subdomains?

I have a quick question regarding SPF records: Do they need to be present for all subdomains? Lets say that I have a TXT record with SPF info for domain.com Let's also say that I have a seperate email domain for subdomain.domain.com Will the SPF…
Mike B
  • 11,871
  • 42
  • 107
  • 168
78
votes
8 answers

How does Windows decide which DNS Server to use when resolving names?

What algorithm does Windows use to decide which DNS Server it will query in order to resolve names? Let's say I have several interfaces, all active, some with no dns server specified, some told to determine it automatically, and some with it…
Artefacto
  • 1,065
  • 1
  • 8
  • 12
77
votes
11 answers

Private IP address in public DNS

We have an SMTP only mail server behind a firewall which will have a public A record of mail.. The only way to access this mail server is from another server behind the same firewall. We do not run our own private DNS server. Is it a good idea to…
Geoff Dalgas
  • 2,476
  • 5
  • 31
  • 32
75
votes
3 answers

What is the difference between a hostname and a fully qualified domain name?

I am new to the world of setting up servers and am baffled by the term hostname and fully qualified domain name (FQDN). For example, if I want to set up a server that hosts files on the local network i.e. a file server, what would I use a hostname…
PeanutsMonkey
  • 1,892
  • 9
  • 27
  • 28
74
votes
14 answers

Docker containers can't resolve DNS on Ubuntu 14.04 Desktop Host

I'm running into a problem with my Docker containers on Ubuntu 14.04 LTS. Docker worked fine for two days, and then suddenly I lost all network connectivity inside my containers. The error output below initially lead me to believe it was because…
Thomas V.
  • 2,071
  • 2
  • 17
  • 13