Website Health Guides

Using Prefetch and Preconnect to Speed Up Loading

Learn how prefetch, preconnect, dns-prefetch and preload work, when to use each resource hint, and how to avoid common performance mistakes.

By CheckDomainHealth Editorial Team Reviewed by Dionis Ceban Updated Jun 28, 2026 10 min read Beginner

Introduction

Prefetch, preconnect and related resource hints help browsers prepare important resources earlier. They can reduce waiting time for fonts, APIs, CDNs, scripts and likely next-page navigation when used correctly.

But resource hints are not magic speed buttons. If you preload the wrong files, preconnect to too many domains or prefetch pages users never visit, you can waste bandwidth and compete with more important resources. The goal is to prioritize what matters most.

Quick answer

Quick answer

Use preconnect for critical third-party domains needed on the current page, dns-prefetch for lower-priority domain lookup preparation, preload for critical current-page resources such as hero images or fonts, and prefetch for likely future navigation. Avoid applying resource hints to every asset or every external domain.

Resource hints

Prefetch and preconnect are browser resource hints. They tell the browser that certain resources or domains may be needed soon.

Resource hints can help the browser:

  • resolve DNS earlier
  • open a connection earlier
  • prepare TLS earlier
  • fetch important resources earlier
  • prepare likely next-page resources
  • reduce waiting time for critical assets

The browser may choose how aggressively to use these hints depending on network, device, priority and current page load.

Hint types

dns-prefetch

Resolves a domain name early.

preconnect

Resolves DNS, opens connection and prepares TLS early.

preload

Downloads a current-page critical resource earlier.

prefetch

Downloads a likely future resource or page with low priority.

prerender

Loads a likely future page in advance. Powerful but should be used carefully.

These hints solve different problems. Do not use them interchangeably.

Preconnect

Preconnect tells the browser to set up an early connection to a domain before the resource is requested.

Good candidates:

  • font provider domain
  • critical API domain
  • CDN used for important assets
  • payment provider required on checkout
  • analytics/tag domain only if truly critical
  • image CDN used above the fold
Preconnect example
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>

Use preconnect only for important domains needed soon. Too many preconnects can waste connections and hurt performance.

DNS prefetch

DNS prefetch is lighter than preconnect. It tells the browser to resolve a domain name early without opening a full connection.

Good candidates:

  • lower-priority third-party domains
  • domains used later on the page
  • external resources that are useful but not critical
  • analytics or social domains that do not need immediate connection setup
DNS prefetch example
<link rel="dns-prefetch" href="//example-cdn.com">

DNS prefetch is cheaper than preconnect, but it still should not be added for every possible external domain.

Preload

Preload tells the browser to fetch a current-page resource earlier because it is important for rendering the page.

Good candidates:

  • main hero image
  • critical font file
  • above-the-fold CSS
  • important script needed early
  • key background image if it affects LCP
Preload example
<link rel="preload" href="/fonts/inter.woff2" as="font" type="font/woff2" crossorigin>

Preload should be reserved for resources that are definitely needed on the current page. Preloading unused files wastes bandwidth.

Prefetch

Prefetch is for likely future navigation, not critical current-page rendering.

Good candidates:

  • next page in a multi-step flow
  • likely next article
  • checkout step after cart
  • dashboard page after login
  • search results after typing
  • next route in a web app
Prefetch example
<link rel="prefetch" href="/pricing">

Prefetch is lower priority than preload. It should not be used for resources required immediately on the current page.

Which hint to use

Need to resolve a domain early

  • Use: dns-prefetch

Need to open a third-party connection early

  • Use: preconnect

Need a critical current-page file sooner

  • Use: preload

Need likely next-page resources

  • Use: prefetch

Need to load a full likely next page

  • Use: prerender, carefully

When unsure, start with fewer hints and measure the impact.

Why this matters

Why this matters

Resource hints matter because browsers cannot load everything at once with equal priority. The browser must decide which connections and files are most important. Good hints help the browser make better early decisions.

Bad hints can do the opposite: they can waste network capacity, delay critical files, increase memory usage or make performance less predictable on mobile connections.

How to check hints

Use HTTP Header Checker, browser developer tools and performance testing to verify resource hints.

Check:

  1. Page source — look for link rel="preconnect", rel="dns-prefetch", rel="preload" and rel="prefetch".
  2. Network tab — confirm hinted resources are requested at the expected time.
  3. Priority — check whether important assets are prioritized correctly.
  4. Console warnings — look for unused preload warnings.
  5. Third-party domains — confirm only important domains use preconnect.
  6. Mobile testing — check whether hints help or hurt on slower networks.
  7. Core Web Vitals — measure whether LCP, INP or overall load improves.

Check page headers

Use HTTP Header Checker to review response headers alongside resource hints in your page HTML.

Run HTTP Header Check →
Useful checks
Check page HTML for hints:
View page source and search for:
rel="preconnect"
rel="dns-prefetch"
rel="preload"
rel="prefetch"

Browser DevTools:
- Open Network tab
- Reload the page
- Check Initiator and Priority
- Look for preloaded resources
- Watch for unused preload warnings
- Compare before/after LCP

Command-line check:
curl -s https://example.com | grep -i "preload\|preconnect\|prefetch\|dns-prefetch"

Command-line checks can show HTML hints, but browser developer tools are better for understanding priority, timing and actual usage.

Common problems

Too many preconnects

Medium

The browser opens connections that may not be needed immediately.

Next step: Keep preconnect for only the most important early third-party domains.

Preload used for non-critical files

Medium

Unimportant resources compete with critical content.

Next step: Preload only current-page resources needed early.

Unused preload warning

Low

A preloaded resource was not used soon after page load.

Next step: Remove the preload or use the correct resource/type.

Missing crossorigin on fonts

Medium

Preloaded fonts may be fetched twice if crossorigin is missing.

Next step: Add crossorigin where required for font preloads.

Wrong as attribute

Medium

The browser cannot prioritize the resource correctly.

Next step: Use correct as value, such as font, image, script, style or fetch.

Prefetch used for current-page assets

Medium

Prefetch is too low priority for resources needed now.

Next step: Use preload for critical current-page resources.

Preconnect to low-value domains

Low

Connections are prepared for domains that do not affect early rendering.

Next step: Use dns-prefetch or remove the hint.

Hints added globally without page context

Medium

Every page loads hints that only matter on some pages.

Next step: Add resource hints only where they are useful.

Hero image not prioritized

Medium

The main visible image loads too late.

Next step: Consider responsive image optimization and preload only the correct hero image.

Third-party scripts still slow page

Medium

Preconnect helps connection setup but does not reduce script execution cost.

Next step: Delay, defer or remove non-critical third-party scripts.

How to use hints safely

  1. Step 1: Identify the bottleneck

    Check whether delay comes from DNS, connection setup, critical resource discovery or next-page navigation.

  2. Step 2: Start with critical domains

    Use preconnect only for important third-party domains needed early.

  3. Step 3: Use dns-prefetch for lower-priority domains

    Prepare DNS lookup without opening full connections.

  4. Step 4: Preload critical current-page resources

    Use preload for hero image, critical font or key file needed early.

  5. Step 5: Prefetch likely future pages

    Use prefetch only for likely next navigation, not required current-page assets.

  6. Step 6: Use correct attributes

    Set as, type and crossorigin correctly where needed.

  7. Step 7: Avoid global overuse

    Do not add the same hints to every page unless they matter everywhere.

  8. Step 8: Measure before and after

    Compare performance on desktop, mobile and slower network conditions.

Preconnect can help with third-party connection setup, but it cannot remove the cost of running third-party JavaScript.

  • Use carefully for: payment providers, essential API domains, critical font providers, required CDN domains.
  • Be careful with: ads, chat widgets, heatmaps, social embeds, multiple tag managers, non-critical analytics, A/B testing scripts.

For third-party scripts, delaying or removing the script may help more than preconnect.

WordPress themes and plugins may add resource hints automatically.

  • performance plugin settings
  • theme-added preloads
  • Google Fonts hints
  • page builder resource hints
  • cache plugin optimization
  • CDN plugin settings
  • duplicate preconnect links
  • unused preload warnings
  • hints that appear on every page unnecessarily

Do not enable every performance-plugin preload option at once. Measure changes and remove hints that do not help.

Resource hint examples
DNS prefetch:
<link rel="dns-prefetch" href="//cdn.example.com">

Preconnect:
<link rel="preconnect" href="https://cdn.example.com" crossorigin>

Preload CSS:
<link rel="preload" href="/assets/app.css" as="style">

Preload font:
<link rel="preload" href="/fonts/inter.woff2" as="font" type="font/woff2" crossorigin>

Preload hero image:
<link rel="preload" href="/images/hero.webp" as="image">

Prefetch likely next page:
<link rel="prefetch" href="/pricing">

Examples are illustrative. Use resource hints only for resources that are truly important for your page or likely next navigation.

Fonts

Fonts are common candidates for preconnect and preload because they can delay text rendering.

For external font providers:

  • preconnect to font domains used early
  • preload only critical font files
  • use crossorigin when required
  • limit font families and weights
  • use font-display where appropriate
Font resource hints
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link rel="preload" href="/fonts/inter-regular.woff2" as="font" type="font/woff2" crossorigin>

Do not preload every font weight. Preload only the most important font files used above the fold.

The Largest Contentful Paint element is often a hero image or large above-the-fold image.

Possible improvements:

  • use correct mobile/desktop image sizes
  • compress images
  • use modern formats
  • preload the actual LCP image when needed
  • avoid preloading hidden desktop image on mobile
  • avoid preloading multiple competing hero images
  • set width and height
  • use fetchpriority where appropriate if supported

Preloading the wrong image can make LCP worse by stealing bandwidth from the right image.

Frequently asked questions

What is preconnect?

Preconnect prepares DNS, connection and TLS setup for an important external domain before it is needed.

What is dns-prefetch?

DNS prefetch resolves a domain early without opening a full connection.

What is preload?

Preload fetches a critical current-page resource earlier.

What is prefetch?

Prefetch prepares resources or pages likely needed for future navigation.

Can resource hints make a site slower?

Yes. Too many hints or wrong hints can waste bandwidth and compete with important resources.

Should I preload every image and font?

No. Preload only resources that are critical for the current page.

What should I optimize first?

Start with the main above-the-fold resource, critical fonts and important third-party domains. Measure before adding more hints.

Use these free tools to verify your configuration after applying changes.

Browse all Website Health guides →

Need help applying this fix?

Send us your domain, report link or issue details. CheckDomainHealth will review the request and route it to the right technical team if hands-on support is needed.

Get Help Run Domain Health Check

Was this guide helpful?

Your feedback helps us improve our guides for everyone.