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.
Minimize DNS Lookups (Deprecated)
DNS Lookups and Website Performance
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
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 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.