Skip to content

Can Browser Prefetching Reveal Domains Before a VPN Connection Starts?

Prefetching and preconnect hints can make a browser contact domains you never opened. Here is when that matters around the moment a VPN connects, and what to do about it.

10 min readUpdated Nov 13, 2026By XPASS Editorial Team

Can Browser Prefetching Reveal Domains Before a VPN Connection Starts?

Most people picture browsing as a simple sequence: you type a name or click a link, and only then does your device contact that site. In practice, modern browsers try to be a step ahead. They may look up the address of a site that a page links to, open a connection early, or even load a page in the background because you are likely to visit it next. This is meant to make browsing faster, and most of the time it is invisible.

It becomes a privacy question when a VPN is part of the picture. If the browser is already running before the VPN connects, some of that early activity could travel on your normal network, not through the tunnel. This article explains what prefetching and preconnect hints are, which ones touch the network, when the exposure could happen, and the practical habits that reduce it. It stays hedged on purpose: behaviour differs between browsers and versions, and no setting makes this risk disappear completely.

What "prefetching" actually covers

The word is used loosely, so it helps to separate the main techniques. They differ in how much they do.

Technique What the browser may do What the network can see
DNS prefetch Looks up the address of a domain it expects to need A DNS request for that domain name
Preconnect Looks up the domain and opens a connection to it early The DNS request and a connection to that server's address
Resource prefetch Downloads a file it expects you to need later The above, plus encrypted data transfer
Page preloading or prerendering Loads a likely next page in the background The above for every resource that page needs

Websites can suggest some of these to the browser using small hints in the page, often written as dns-prefetch, preconnect or prefetch link hints. Browsers can also decide on their own, using the links on the page you are viewing or your past habits. A browser may follow a hint, delay it, or ignore it, depending on its settings and the situation.

The first step in all of these is a DNS lookup, which turns a name such as example.com into an address. If you want the background, how DNS works explains the process, and RFC 1034 describes the domain name system in detail. The key point here is that a lookup names the domain. Even before any page content moves, the fact that a lookup happened can say something about the sites involved.

Why the moment before a VPN connects matters

A VPN builds a tunnel between your device and a VPN server. After the tunnel is up, your device normally sends traffic through it, and that usually includes DNS lookups. Before the tunnel is up, your device uses the ordinary network: the home router, the hotel Wi-Fi or the mobile network, and the DNS server that network provides.

That gap creates a short window. If a browser window is open at that time, anything it does during the window goes the ordinary way. There are a few common ways this happens:

  • A restored session. Many browsers reopen the tabs you had last time. When the browser starts, those pages may load and trigger lookups for the sites they use, including embedded content and trackers, before you have had time to connect the VPN.
  • A page left open in the background. A news page or web app that refreshes itself keeps making requests while your connection changes. A prefetch hint or a refresh can cause new lookups at any point.
  • Reconnecting after a drop. If the VPN disconnects and reconnects, there can be a few seconds between the old tunnel ending and the new one starting. Open tabs may try to reach their sites in that gap.
  • Opening the browser first out of habit. You start the browser, the home page and its preloaded suggestions begin to load, and only then do you open the VPN app.

In each case the visible effect on the page may be nothing at all. The privacy effect is that the local network, or its DNS server, may be able to see the domain names involved, even though you never clicked on some of them.

What an observer could and could not learn

It is worth being precise about the size of the exposure so it is neither ignored nor exaggerated.

What may be visible on the ordinary network:

  • The domain names that were looked up, if the lookup was not encrypted. With ordinary DNS this is readable by the network and by the DNS server it uses.
  • The address of any server the browser opened a connection to. Even without the name, an address can often be linked to a particular service.
  • The timing of these events.

What is generally not visible:

  • The content of pages loaded over HTTPS. HTTPS encrypts the content between your browser and the site, regardless of whether a VPN is used. RFC 9110 describes the underlying HTTP behaviour.
  • Your account activity inside the sites, such as messages or searches.

So the realistic concern is not that someone reads your pages. It is that a list of domain names, some of which you did not choose to open, could be seen by the network operator or the DNS server. For many people that is a minor point. For someone who wants a clean separation between what happens on a local network and what happens through the VPN, it is worth managing.

A separate effect: if a prefetch causes an early lookup, the answer may also be saved in a cache for a while. That does not usually expose anything new, but it can explain why a site seems to load from an older address after you connect.

How VPN setup changes the picture

Not every VPN session has this gap in the same way. Several things matter.

Order of steps. If you connect the VPN first and open the browser second, the browser starts inside the tunnel. There is little for it to do on the ordinary network. This is the simplest and most effective habit.

Always-on or automatic connection. Some VPN apps and operating systems can start the connection at boot or when a network is joined. Whether your app has an option like this, and what it is called, varies. If it exists, it can shorten the window, though it may not remove it entirely, because the browser and the VPN can both be starting at once.

A kill switch. A kill switch is meant to block traffic if the tunnel drops. It can reduce exposure during a reconnection. Read what a VPN kill switch is to understand what it does and what it does not. Do not assume that a kill switch also covers the start-up moment before the first connection; that depends on the app and the system, so check the app's own description.

Browser DNS settings. Some browsers can send DNS lookups to their own chosen resolver, separate from the system. That changes who sees lookups after the VPN is on as well. Browser Secure DNS and VPN covers how that interaction works and how to make the settings agree.

None of these can be described as a guarantee. A VPN is one layer, and the exact behaviour of your browser and operating system decides the result.

Practical steps to reduce early exposure

You do not need to become an expert in browser internals. A few repeatable habits make most of the difference.

  1. Connect first, browse second. Open the VPN app, wait for it to show that it is connected, and only then start the browser. If the browser is already running, close it fully before connecting, and reopen it afterwards.
  2. Be careful with restored tabs. If your browser reopens the previous session, sensitive tabs will load as soon as it starts. Consider setting the browser to open a blank page or a simple start page, or close sensitive tabs before you quit.
  3. Check preloading settings. Many browsers have a setting for preloading pages or for predicting network actions. Names and locations vary by browser and version, so look in the privacy, performance or cookies settings for words like "preload", "prefetch" or "predict". Reading what each option says before changing it is wise.
  4. Pause automatic refresh pages when changing networks. If you leave a dashboard or news page open, it may keep making requests as your connection changes. Close it before switching networks, or before you connect.
  5. Use your VPN app's protective options. If the app offers a kill switch or an automatic connection option, read its description and decide whether it suits you. Settings and labels differ by app and by device.
  6. Test with a leak check. After you have set things up, run the checks in how to test VPN DNS leaks. A test shows where lookups go after the VPN is on. It will not show what happened a minute earlier, so combine it with the order-of-steps habit.

A plain example

Imagine you are in a café and you open your laptop. Your browser restores three tabs: an email page, a news site and a shopping page you looked at yesterday. Before you start the VPN, those tabs load. The news site embeds content from several other domains, and the browser looks those up too. The café network's DNS server receives all of those requests.

You then start the VPN app and it connects. From that moment, new lookups go through the tunnel. The earlier requests have already happened, and you cannot take them back.

Now compare a second routine. You sit down, start the VPN app, wait for the connected status, and then start the browser. The three tabs are restored, but they now load inside the tunnel. Prefetch lookups and early connections still happen, because they are normal browser behaviour, but they are carried by the VPN like everything else. The café network sees an encrypted connection to the VPN server rather than a list of domain names. The difference is small in effort and can be meaningful in what the local network sees.

Limits and what to watch for

It is easy to overstate what you can control, so keep these limits in mind.

  • You cannot see everything the browser does. Prefetch and preconnect decisions are made inside the browser, and the rules change between versions. A setting that exists today may be renamed or removed later.
  • Turning off a setting does not prove silence. Even with prefetch options off, a browser still looks up domains when you load a page and may contact services for updates, safe-browsing lists or sync. Prefetch is only one source of early requests.
  • A VPN does not stop the browser from making requests. It changes the path. If the browser is set to send DNS elsewhere, or a page opens in a mode that ignores system settings, you should test the result rather than assume.
  • Other apps behave the same way. Your email program, chat apps and system updater may all make requests the moment a network is joined. A browser is only the most visible example. If you want a clean start, the ordering habit helps for the whole device.
  • A VPN is not anonymity. Even when everything goes through the tunnel, the VPN provider carries your traffic, and the sites you sign in to still know who you are. See what a DNS leak is and is not, and consider your own situation, such as a clear threat model, before relying on any tool.
  • Public sources are worth reading. The EFF's Surveillance Self-Defense guides explain how to think about this kind of exposure in general terms. They are a better place to start than any single setting.

If your concern is high, for example you are on a network you do not trust and the domain names themselves are sensitive, treat the minutes around connecting as the weak point. Connect first, avoid restored sessions, and test. If your concern is low, the default browser behaviour is usually acceptable.

A short checklist you can reuse

  • Close the browser fully before you connect the VPN.
  • Wait for the VPN app to show a connected state.
  • Open the browser only after that.
  • Check that no sensitive tabs are set to reopen automatically.
  • Review the preload or prefetch setting once and note what you chose.
  • If the VPN drops, close the browser tabs you care about before reconnecting, or check whether your app has a kill switch.
  • Run a DNS leak test occasionally, and again after a browser update or a change of settings.

Repeating this takes under a minute. After a few times it becomes a habit that costs nothing, and it removes most of the realistic chances for early requests to be seen on the local network.

Summary

Browsers can look up or connect to domains before you click on them, using DNS prefetch, preconnect and page preloading. If that happens before a VPN is connected, the local network or its DNS server may be able to see those domain names, even for sites you did not open. HTTPS still protects page content, and a VPN protects traffic once the tunnel is up, but neither changes what happened earlier. The most practical steps are to connect the VPN first, avoid restored sensitive tabs, review your browser's preload settings, and test your own setup. None of this offers a guarantee, because browsers and operating systems differ.

If you want a simple way to get a VPN pass for these routines, you can see the options on the XPASS pricing page.

Frequently asked questions

Can a browser contact a website before I click on it?

Yes, it can. Many browsers resolve domain names or open early connections for links and resources on a page, and some can load a likely next page in the background. The exact behaviour depends on the browser, its version, its settings and what the page asks for, so treat it as something that may happen rather than something that always does.

If I open my browser before connecting the VPN, can my network see domains I never visited?

It is possible. A page that was already open, or a tab restored at start-up, may trigger lookups or connections for domains on that page. Those requests travel on the normal network until the VPN is connected, so the local network or its DNS server may be able to see them. Whether it happens in your case depends on what is open and how your browser is set up.

Does turning on a VPN stop prefetching?

No. The VPN changes the route that requests take, not whether the browser makes them. Once the tunnel is up, prefetch lookups and connections go through it like other traffic, as long as DNS is not being sent elsewhere by a browser setting.

How can I reduce the chance of early exposure?

Connect the VPN first, then open the browser. Close or avoid restoring sensitive tabs at start-up, check the browser's page preloading and prefetch settings, and use a kill switch if your VPN app offers one. None of these is a guarantee, so test your own setup.

Should I disable prefetching completely?

Not necessarily. Prefetching exists to make pages feel faster, and turning it off can make browsing feel slower. It is a trade-off. If your concern is the minutes around connecting the VPN, changing the order of your steps usually matters more than changing the setting.

About the author

Bob Kanokphon Thongdee, founder of XPASS VPN

Bob Kanokphon Thongdee

  • Founder of XPASS VPN
  • Co-founder of eSIMonline.asia
  • More than 7 years in online marketing
  • Founder of Cojourney Visa and Cojourney Travel

Need a VPN for a short trip or a busy month?

XPASS sells prepaid passes for a set number of days. You pay once and nothing renews automatically.

See passes

Keep reading

Device Guides

Browser Secure DNS and VPN: How They Interact

Your browser can send its own encrypted DNS lookups, separate from the VPN. Here is what each combination means and how to choose settings that agree.

9 min read

VPN Security

What Is a DNS Leak?

A DNS leak happens when your device asks for website addresses outside the VPN tunnel. Here is why it happens, how to test for it, and what to do about it.

10 min read

VPN Security

How to Run a VPN DNS Leak Test

A leak test is only useful if you take a baseline first and read the results correctly. This method covers before-and-after checks, repeat tests and what the output means.

10 min read