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.
Related
Get notified when this term updates
Plus occasional practical tips on uptime and monitoring, nothing else. Unsubscribe anytime.
यह पेज सामान्य जानकारी है, जिसे हमारी संपादकीय टीम ने लिखा है और दस्तावेज़ीकरण बदलने पर अपडेट किया जाता है। सर्वर और प्रदाता अलग-अलग होते हैं, इसलिए बदलाव पहले सुरक्षित तरीके से जाँचें। देखें: संपादकीय नीति और अस्वीकरण.