Glossary · Performance

DNS Lookup Time

DNS lookup time is how long it takes to resolve a hostname to an IP address before a connection can start, often 20-120 ms on a cold cache.

Updated October 6, 2026

DNS lookup time is the delay spent translating a hostname such as www.example.com into an IP address before the browser can open a connection. It is the first segment of a request in a waterfall chart.

Why it matters

Every new hostname on a page needs a lookup, and nothing else for that origin can start until it completes. A cached answer takes about zero time, but a cold lookup must go through the recursive resolver and possibly several authoritative servers. A page that pulls from ten third-party domains pays that cost many times, in parallel but still on the critical path for each.

Lookup time depends on the resolver's cache, the TTL of the record, the distance and speed of your authoritative nameservers, and any CNAME chain.

Example

Browser timing API:

const [r] = performance.getEntriesByType('resource');
console.log(r.domainLookupEnd - r.domainLookupStart); // ms

A value of 0 means a cached answer or a reused connection.

Common mistakes

  • Using very short TTLs for static records, forcing frequent cold lookups.
  • Chaining several CNAMEs before the final A record.
  • Slow or single-location nameservers.
  • Using many distinct hostnames; sharding is not helpful with HTTP/2.

Get notified when this term updates

Plus occasional practical tips on uptime and monitoring, nothing else. Unsubscribe anytime.

This page is general information written by our editorial team and updated when documentation changes. Servers and providers differ, so test changes safely first. See our editorial policy and disclaimer.