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
74
votes
3 answers

How long does negative DNS caching typically last?

If a DNS server looks up a record and it's missing, it will often "negatively cache" the fact that this record is missing, and not try to look it up again for a while. I don't see anything in the RFC about the TTL on negative caching should be, so…
Leopd
  • 1,757
  • 4
  • 24
  • 30
74
votes
6 answers

How to redirect domain A to domain B using A-Records and CNAME records only

I have 2 domains hosted with different hosts. I need to redirect Domain A to Domain B. Unfortunately I can't do a 301 redirect from Host A, but can only modify/add DNS entries (A-Records and CNAMEs) at Host A. Surely it is possible to redirect…
Prembo
  • 927
  • 1
  • 6
  • 11
72
votes
1 answer

How long does it take for DNS records to propagate?

This is a Canonical Question about DNS Propagation How long does it take for an the various types of records to propagate? Do some propagate faster than others? Why does it take time for DNS records to propagate and how does it work?
user38535
71
votes
21 answers

How the heck is http://to./ a valid domain name?

Apparently it's a URL shortener. It resolves just fine in Chrome and Firefox. How is this a valid top-level domain? Update: for the people saying it's browser shenanigans, why is it that: http://com./ does not take me to: http://www.com/? And, do…
Christopher
  • 1,381
  • 1
  • 12
  • 22
71
votes
3 answers

How to ensure OpenVPN connection uses specific DNS?

I'm using OpenVPN through Tunnelblick on MacOS X Lion. I need to set specific DNS (with local IP, which works only when VPN is up) for the duration of this VPN session only. I do not have access to the OpenVPN server configuration. Only client…
Stanislav Shabalin
  • 813
  • 1
  • 6
  • 6
70
votes
15 answers

Are IP addresses "trivial to forge"?

I was reading through some of the notes on Google's new public DNS service: Performance Benefits Security Benefits I noticed under the security section this paragraph: Until a standard system-wide solution to DNS vulnerabilities is universally…
Jeff Atwood
  • 13,104
  • 20
  • 75
  • 92
70
votes
18 answers

Is Round-Robin DNS "good enough" for load balancing static content?

We have a set of shared, static content that we serve up between our websites at http://sstatic.net. Unfortunately, this content is not currently load balanced at all -- it's served from a single server. If that server has problems, all the sites…
Jeff Atwood
  • 13,104
  • 20
  • 75
  • 92
69
votes
7 answers

DNS A vs NS record

I'm trying to understand DNS a bit better, but I still don't get A and NS records completely. As far as I understood, the A record tells which IP-address belongs to a (sub) domain, so far it was still clear to me. But as I understood, the NS record…
Tiddo
  • 1,019
  • 1
  • 9
  • 16
67
votes
2 answers

Why does Heroku warn against "naked" domain names?

I ran across this page in the Heroku docs... Naked domains, also called bare or apex domains, are configured in DNS via A-records and have serious availability implications when used in highly available environments such as massive on-premise…
Agvorth
  • 2,459
  • 4
  • 29
  • 29
66
votes
7 answers

DNS failing to propagate worldwide

I haven't changed anything related to the DNS entry for serverfault.com, but some users were reporting today that the serverfault.com DNS fails to resolve for them. I ran a justping query and I can sort of confirm this -- serverfault.com dns appears…
Jeff Atwood
  • 13,104
  • 20
  • 75
  • 92
65
votes
7 answers

Government censors HTTPS traffic to our website. Workarounds?

I am helping run a website that has been blocked for political reasons by the same Russian agency that has previously tried blocking Telegram (RosKomNadzor). This is not the first time it happens, and previously we would just change the domain, but…
Mary
  • 593
  • 4
  • 7
62
votes
2 answers

Can we have multiple CNAMES for a single Name?

I need this for load balancing. For example, I've two azure storage accounts (say a and b) and the blob addresses for those are a.blob.core.windows.net and b.blob.core.windows.net. Both of them store identical data. Now I need to provide a single…
Raghuram Murthy P
  • 723
  • 1
  • 5
  • 4
61
votes
8 answers

Overriding some DNS entries in BIND for internal networks

I have an internal network with a DNS server running BIND, connected to the internet through a single gateway. My domain "example.com" is managed by an external DNS provider. Some of the entries in that domain, say "host1.example.com" and…
Remy Blank
  • 1,995
  • 3
  • 15
  • 11
58
votes
2 answers

What are SPF records, and how do I configure them?

This is a canonical question about setting up SPF records. I have an office with many computers that share a single external ip (I'm unsure if the address is static or dynamic). Each computer connects to our mail server via IMAP using outlook.…
vulgarbulgar
  • 739
  • 1
  • 8
  • 14
57
votes
10 answers

How to use DNS/Hostnames or Other ways to resolve to a specific IP:Port

This is a Canonical Question about DNS/Hostnames resolution to IPs/Ports Example 1 I'm running a web server on port 80 and another on port 87. I would like to use DNS so that www.example.com goes to port 87. How can I accomplish this using DNS…
Tom Smykowski
  • 1,125
  • 5
  • 19
  • 27