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.