Minimize DNS Lookups (Deprecated)

DNS Lookups and Website Performance

Another way to help reduce a visitor’s perception of page load time is to reduce the number of DNS (Domain Name System) lookups. Even prior to establishing a connection with your web server, the DNS must be resolved, which means the host, or domain name, must be translated into the IP (Internet Protocol) address that the DNS can read. While this may seem like a straightforward process, it can sometimes get messy, as there are four distinct types of DNS servers (DNS recursor, root nameserver, TLD (Top Level Domain) nameserver, authoritative nameserver) that are involved. If the client/browser has the record cached, it is typically not an issue, however, if a DNS lookup must occur again, then it can cause latency and delays, depending on the physical location of the DNS servers.

How to Minimize DNS Lookups

One way to minimize DNS lookups is to reduce the number of subdomains and create different URL paths, or subdirectories. Obviously, there may be good reasons to use subdomains, like having a place to host a lot of content or region-specific purposes, but subdomains may also cost more, as you may be billed for the number of domains you own. Again, only use subdomains where necessary to avoid multiple DNS lookups from occurring. You could also consider hosting third-party content, which would help avoid additional DNS lookups, but you lose a bit of control over how that content is hosted.

DNS Lookup Additional Recommendations

An additional recommendation for minimizing DNS lookups is to minimize the number of lookups when loading and rendering the initial page elements. Earlier in this guide we talked about external JavaScript files. If you have any external JavaScript files that are loading in the header or early in the HTML body, it needs to come from the same host as the primary document. If not, this will require another separate DNS lookup. And any JavaScript this will block anything else from rendering on the page until the JavaScript is completely downloaded, parsed, and executed.



Lighthouse is an open-source tool that is used to run an audit against your web pages and provides scores and suggestions for improving page performance, accessibility, SEO, and more.


PageSpeed Terms

PageSpeed Insights is a tool created by Google that reports on the performance of a page on both mobile and desktop devices, and provides suggestions on how that page may be improved.



YSlow is an open-source website analysis tool that can be used to identify web page performance issues. Learn more about the YSlow to enhance your web pages and the user experience.