Even with an active VPN connection, a website may still detect your location through one of several methods unrelated to your IP address. This guide explains the most common causes and how to address each one.
Jump To …
DNS Leaks
Browser Location Permissions
Cookies and Cached Data WebRTC Leaks
Device Location Services
DNS Leaks
If your DNS requests are not routed through the VPN, your internet service provider's DNS servers may reveal your location to websites. To fix this, set your DNS servers to PIA DNS. You can find the DNS details here.
For step-by-step instructions, see the guide for your device:
- Changing DNS settings in Windows
- Changing DNS settings in macOS
- Changing DNS settings in Android
- Changing DNS settings in iOS
- Changing DNS settings in Linux
Browser Location Permissions
Your browser may be sharing your location directly with websites through its built-in geolocation feature. This happens when you have previously clicked "Allow" on a browser location prompt.
To stop this, disable location access in your browser settings. See our guide on disabling location-aware browsing for steps.
Cookies and Cached Data
Websites store location data in cookies and cached files from previous browsing sessions. This data persists even after you connect to a VPN. Clear your browser's cookies, as well as cache and browsing history if necessary, before connecting to ensure no location data is carried over from a previous session.
Note that clearing cookies will sign you out of the site, so make sure you have your login details to hand before proceeding.
- Chrome: Visit the site, then click the lock icon in the address bar. Select Cookies and Site Data > Manage Cookies and Site Data. Click the trash icon next to the site's cookies to remove them.
- Firefox: Click the three-bar menu and go to Settings > Privacy & Security > Cookies and Site Data > Manage Data. Search for the site, select it, click Remove Selected, then Save Changes.
- Safari: Go to Safari > Settings > Privacy > Manage Website Data. Search for the site, select it, and click Remove.
WebRTC Leaks
Some browsers use WebRTC, a technology that enables real-time communication features. To establish direct connections between devices, it can send requests outside the VPN tunnel and reveal your IP address even when your VPN is active. To prevent WebRTC leaks, you can disable WebRTC in your browser settings.
Steps to disable WebRTC vary by browser:
- Chrome: WebRTC cannot be fully disabled without an extension. Install the WebRTC Control extension from the Chrome Web Store and enable it.
- Firefox: Type about:config in the address bar and press Enter. Search for media.peerconnection.enabled and double-click the entry to set its value to false. Restart Firefox to apply the change.
- Safari: Safari requires explicit permission before accessing your camera or microphone. This limits how much WebRTC can do without your knowledge and restricts local IP address exposure in most configurations.
Device Location Services
If location services are enabled on your device, apps and websites may access your GPS or Wi-Fi network data to determine your location independently of your IP address. To prevent this, disable location access for your browser or specific apps.
- iOS: Go to Settings > Privacy & Security > Location Services. Find your browser or the app you are using and tap it. Set location access to Never.
- Android: Go to Settings > Location > App location permissions. Find your browser or the app you are using, tap it, and select Don't allow.