coderef

<link rel="dns-prefetch">Baseline · Newly available

The rel="dns-prefetch" attribute for the &#x3C;link> HTML element is a hint to the browser that the page or user is likely to request resources from another domain, so the browser should preemptively resolve DNS for the href value's domain.

Works in the latest version of every major browser, but older devices may not support it yet. Baseline since Sep 15, 2025.

Browser support

DesktopChrome
1–45Not supported
46+Supportedsince Oct 13, 2015
Current: 155
Edge
12–18Not supported
79+Supportedsince Jan 15, 2020
Current: 154
Firefox
1–126Not supported
127+Supportedsince Jun 11, 2024
Current: 157
Safari
1–4Not supported
5+Supportedsince Jun 7, 2010
Current: 27
MobileChrome Android
18–45Not supported
46+Supportedsince Oct 14, 2015
Current: 155
Firefox Android
4–126Not supported
127+Supportedsince Jun 11, 2024
Current: 157
Safari iOS
1–18.6Not supported
26+Supportedsince Sep 15, 2025
Current: 27

How to use

Every current browser supports this, but it only became Baseline on Sep 15, 2025. Use it as a progressive enhancement, or keep a fallback if you support older devices.

Example

Full syntax and examples are on MDN: dns-prefetch.

Feature detection

JS · check before using
if ("rel" in document.createElement("link")) {
  // the rel attribute/property of <link> is supported
}