Skip to main content
短.be

DNS Prefetch

A browser optimization that resolves link destination domain names in advance. Reduces page load time when a user clicks a link.

Nov 24, 2025 · About 1 min read

Redirect

DNS prefetch is a browser optimization technique that proactively resolves the DNS (domain name to IP address conversion) for linked domains before the user clicks. When the link is actually clicked, DNS resolution is already complete, shaving tens to hundreds of milliseconds off page load time.

DNS resolution typically takes 20 to 120 milliseconds, and can be even longer on mobile connections. DNS prefetch eliminates this wait entirely. It is enabled simply by adding <link rel="dns-prefetch" href="//example.com"> in the HTML head.

For shortened URLs, DNS prefetch can improve redirect speed. Clicking a shortened URL triggers DNS resolution for the shortener's domain first, then for the destination domain. Prefetching the destination domain eliminates the second DNS lookup, improving perceived speed.

Related technologies include preconnect (DNS resolution + TCP connection + TLS handshake in advance), prefetch (downloading the entire resource ahead of time), and prerender (rendering the full page in advance). In terms of resource cost versus benefit, dns-prefetch is the lightest with the fewest side effects, making it ideal for pages with many external links.

One caveat: DNS prefetch increases requests to DNS servers. Setting prefetch for every external link on a page adds unnecessary DNS server load, so it is best to limit it to the most important link destinations. You can find related books on Amazon.

Share on XHatena

Was this article helpful?

Related Terms

Related Articles

FAQ

How do I set up DNS prefetch?
Add <link rel="dns-prefetch" href="//example.com"> inside the HTML <head>. Omit the protocol (https:) and specify only the domain name.
What is the difference between DNS prefetch and preconnect?
dns-prefetch only performs DNS resolution in advance. preconnect also establishes the TCP connection and TLS handshake, providing greater speed gains but consuming more resources. Use preconnect for critical external resources and dns-prefetch for the rest.
Are there any downsides to DNS prefetch?
It increases DNS server requests. Setting prefetch for a large number of domains adds unnecessary load to the user's network and DNS servers. Limit it to destinations that are likely to be clicked.

Ready to create a short URL?

Shorten a URL for Free