4

I've heard this from almost every domain name registrar: your domain name "needs to propagate through the DNS and may take 24-48 hours to do so." And yet, bar a few registrations (which might take half a day), they all are ready within 1-2 hours, in my experience.

For example, on a recent registration with DreamHost, emphasis mine:

We have added [xxxx] to our registration queue.

You will receive an email within 15 minutes when it has been registered. If you don't receive an email please contact our support team as this may indicate some kind of problem! Please note that the domain will not work for at least a day or two as DNS propagates. Thank you for registering your domain with DreamHost!

This got me thinking: does this 24-48 hour period really exist, or is it just so they can cover themselves in case unforeseen problems occur?

Sklivvz
  • 78,578
  • 29
  • 321
  • 428
Thomas O
  • 11,908
  • 7
  • 53
  • 72
  • Some registrars have told me "up to 72 hours" for changing DNS servers, and I've experienced this on a few rare occasions. Originally there was a 24-hour cycle in which the root DNS servers would get their zones updated (root servers provide glue {A and AAAA records for registered DNS servers} and name server {NS records} data only), but I recall this was changed to an 8-hour cycle many years ago for gTLDs. For ccTLDs, the policies vary depending on how each respective country decides to manage their top-level domain. – Randolf Richardson Aug 01 '11 at 15:05
  • 1
    On what basis are you able to state that “[with some exceptions]they all are ready within 1-2 hours”? If there are out of the way servers which update slower, how would you possibly know? How can you tell if the person in outer Mongolia can reach your server? – user179700 Aug 03 '11 at 02:21

1 Answers1

15

TTL (time-to-live) for DNS records:

TTLs also occur in the Domain Name System (DNS), where they are set by an authoritative nameserver for a particular resource record. When a caching (recursive) nameserver queries the authoritative nameserver for a resource record, it will cache that record for the time (in seconds) specified by the TTL. If a stub resolver queries the caching nameserver for the same record before the TTL has expired, the caching server will simply reply with the already cached resource record rather than retrieve it from the authoritative nameserver again. Nameservers may also have a TTL set for NXDOMAIN (acknowledgment that a domain does not exist); but they are generally short in duration (three hours at most).

Shorter TTLs can cause heavier loads on an authoritative nameserver, but can be useful when changing the address of critical services like Web servers or MX records, and therefore are often lowered by the DNS administrator prior to a service being moved, in order to minimize disruptions.

The units used are seconds. An older common TTL value for DNS was 86400 seconds, which is 24 hours. A TTL value of 86400 would mean that, if a DNS record was changed, DNS servers around the world could still be showing the old value from their cache for up to 24 hours after the change.

Newer DNS methods that are part of a DR (Disaster Recovery) system may have some records deliberately set extremely low on TTL. For example a 300 second TTL would help key records expire in 5 minutes to help ensure these records are flushed world wide quickly. This gives administrators the ability to edit and update records in a timely manner. Remember, TTL values are "per record" and setting this value on specific records is normally honored automatically by all standard DNS systems world-wide.

Why that would be a problem:

DNS caching servers:

Recursive and caching name server In principle, authoritative name servers are sufficient for the operation of the Internet. However, with only authoritative name servers operating, every DNS query must start with recursive queries at the root zone of the Domain Name System and each user system must implement resolver software capable of recursive operation.

To improve efficiency, reduce DNS traffic across the Internet, and increase performance in end-user applications, the Domain Name System supports DNS cache servers which store DNS query results for a period of time determined in the configuration (time-to-live) of the domain name record in question. Typically, such caching DNS servers, also called DNS caches, also implement the recursive algorithm necessary to resolve a given name starting with the DNS root through to the authoritative name servers of the queried domain. With this function implemented in the name server, user applications gain efficiency in design and operation.

The combination of DNS caching and recursive functions in a name server is not mandatory; the functions can be implemented independently in servers for special purposes.

Internet service providers typically provide recursive and caching name servers for their customers. In addition, many home networking routers implement DNS caches and recursors to improve efficiency in the local network.

In combination, this means that a domain name may take several TTL periods to propagate, and each TTL period used to commonly be 24-48 hours, meaning the overall time to propagate a domain name could easily take 24 hours. On the other hand, if there are fewer recursive steps and shorter TTL values on the caches, the period might be much faster - especially if the domain name is not requested for the first time until the original name server is configured.

vartec
  • 26,581
  • 5
  • 97
  • 155
  • Does that not more correctly apply to a change, vs an addition? Seems like they are two separate events. On an add of a new domain, TTL and caching should not matter). On a change of a domains info, of course. – geoffc Aug 01 '11 at 14:07
  • @geo: per protocol standards, DNS servers will still yield a NXDOMAIN result for a lookup of a non-existant domain, albeit one containing an error message. Since it is up to the manufacturer to implement the DNS standards at will, it is certainly conceivable that there'd be DNS servers out there that cache requests for non-existant domains as well (I don't know what the standards say about that). – David Hedlund Aug 01 '11 at 14:16
  • @geo: http://en.wikipedia.org/wiki/Negative_cache – vartec Aug 01 '11 at 14:35
  • Also worth mentioning that because this depends upon the setup of each DNS server it is possible that it will take even longer than 48 hours if the person who set up the DNS server you are using set an exceptionally high TTL. It's really just to cover the providers back as they have no control over the majority of servers on the net, hence no control on how often they are updated. – Ardesco Aug 01 '11 at 15:09
  • 1
    yeah, maximum TTL is 68 years. – vartec Aug 01 '11 at 15:16
  • @vartec 2 billion seconds? signed 32 bit int? – geoffc Aug 01 '11 at 17:17
  • @geo, yeah signed 32-bit int, so max is 0x7FFFFFFF == 2^31-1. – vartec Aug 01 '11 at 21:01
  • 1
    Note that your computer will also cache DNS records. On Windows, you can clear the cache using `ipconfig /flushdns` – BlueRaja - Danny Pflughoeft Aug 01 '11 at 21:47
  • and a registrar will not give you the minimum time as a period it can take to propagate because there are factors outside of their control that can delay propagation. Were they to "guarantee" propagation within 24 hours and after 36 hours someone can't find a site, especially in the US they're liable to sue for insane "damages". – jwenting Aug 02 '11 at 11:17