Free auditStart free
GlossaryGlossary · Performance

dns-prefetch

dns-prefetch is a resource hint that resolves a cross-origin domain name before a request needs it. Syntax, how it differs from preconnect, and a check.

2 min
read
1
sources
Oct 29, 2026
updated
Scaplet Editorial Team
author
In one line

dns-prefetch is a link hint that asks the browser to resolve a cross-origin domain to an IP address before any resource on it is requested, hiding some DNS lookup latency. It does only the DNS step. Preconnect also opens the connection, so it costs more and suits only the most critical origins.

30-second check

Is this costing your site traffic?

Four quick questions, then a straight answer.

1/4Have you checked your own site for this?
Summarize this page withChatGPTClaudePerplexityGoogleAI Mode

At a glance

4 facts from the sources below
DNS lookup only
Does
Cross-origin domains
Applies to
link element or Link header
Forms
Ignore the hint, nothing breaks
Unsupported browsers
01At a glance

Anatomy of the hint

Part

rel="dns-prefetch"

Job
Asks the browser to resolve the host name early
Part

href

Job
The third-party origin whose domain should be resolved
Part

No crossorigin attribute

Job
It only does DNS, so the attribute isn't needed
In the document head
<link rel="dns-prefetch" href="https://fonts.googleapis.com/">
Or as a response header
Link: <https://fonts.googleapis.com/>; rel=dns-prefetch
03Your call

Check it in 2 minutes

At the time of writing this prints dns-prefetch links for the Guardian's asset hosts. Run it on your page and compare the hinted origins to the third-party hosts in the DevTools Network panel. A hint for an origin the page never requests is wasted, and an unhinted host on the critical path is a candidate.
If this fits

Add dns-prefetch if

  • The page loads from several third-party hosts
  • The host isn't important enough to justify a full preconnect
  • You want a fallback beside a preconnect hint
Or

Skip it if

  • The resource comes from your own origin
  • You already preconnect to the same host with no need for a fallback
  • The third-party request happens late, if at all
List the hints a live page sends
curl -sL -A 'Mozilla/5.0' https://www.theguardian.com/ \
  | grep -o -i '<link[^>]*dns-prefetch[^>]*>' | head
Questions

Asked a lot.

1 questions people ask next, answered from the sources on this page.

01Does dns-prefetch improve SEO?

It is a performance hint, not a ranking directive. It can shave time off third-party loads, which you can measure in the Network panel or Lighthouse. Measure before and after rather than assuming a gain.

Sources · 1

Every fact, linked and dated.

Official docs first. The date is when we last opened each page.
  • mozilla.org
  1. 01dns-prefetch (MDN)developer.mozilla.org · checked 2026-11-01
Free · 2 minutes

Know the term. Now check your site.

The free audit reads robots.txt, sitemaps, status codes, canonicals, redirects and structured data.

Free, no card60 secondsNobody will call you
  • 46 fixes shipped without a ticket Brightpipe
  • +212% organic clicks in 90 days Ledgerly