It's easy to guess how a browser can pinpoint your location when you’re using a mobile phone: through GPS. When searching for restaurants near you, Google can suggest the best restaurants within walking distance. But what about when you’re using a device that doesn't have GPS capability, such as a desktop computer? Sure: browsers can know and provide websites through your public IP address, but this is only a rough estimation of your location and can be hidden using a VPN. So how is it possible that when you seek nearby restaurants on a desktop, Google is still able to pinpoint precisely where you are?
How Does Browser Geolocation Work?
Modern browsers implement the geolocation API defined by the World Wide Web Consortium (W3C) that typically uses one the following location sources: GPS, available Wi-Fi networks and signal strengths, GSM/CDMA cell IDs, and IP addresses.
Therefore, the way browsers pinpoint your location on a desktop is through the Wi-Fi router you are connected to. But this still doesn’t explain how your browser knows the specific position of your router.
GPS-enabled devices such as mobile phones are designed to read the MAC addresses of all nearby wireless access points – including your router – and forward them to a database. Depending on the device you use, this can be a Google or Apple database, and its information makes it possible to know the precise location of your router.
How to Protect Yourself From Geolocation
It's impossible to prevent the MAC addresses from your routers from being sent to these databases. Even your neighbor can unknowingly do this while trying to reach their own Wi-Fi. How can you protect yourself?
The best option is to make sure your browser’s settings are well configured and that they aren’t sharing your geolocation without your knowledge. By default, browsers will ask you if you want to share your location with a website. However, to avoid the hassle of choosing this every time you visit a website, you can change settings in order to never share your physical location.
Turning off Geolocation in Google Chrome
- Go to Settings.
- Go to Advanced > Privacy and security.
- Click on “Site settings”.
- Click on “Location”.
- Click on the slider on the right.
When you click on the slider, “Ask before accessing” will change to “Blocked”.
Turning off Geolocation in Firefox
- Go to Options > About > Preferences.
- Go to Privacy & security.
- Scroll down until you find Permissions.
- Click on the ‘Settings’ button on the right.
- Check the option ‘Block new requests asking to access your location’.
- Save changes.
These steps will work with other Firefox-based browsers, such as Waterfox.
Turning off Geolocation in Safari
- Go to Safari in the top left of the task bar.
- Go to Preferences.
- Go to Websites.
- Go to Location.
- Beside ‘When visiting other websites’, select ‘Deny’.
Turning off Geolocation in Microsoft Edge
Since Microsoft Edge is a Windows app, you’ll need to configure the location permission through Windows settings:
- Click on the Windows start button.
- Go to Settings.
- Click on Privacy.
- Select Location under App permissions.
- If you want to deny access to your location – even to Windows itself – click on Change under ‘Location for this device' and disable it.
- If you want Windows (but not other apps) to have access to your location, click on the button under ‘Allow apps to access your location’ to disable it.
Turning off Geolocation in Internet Explorer
If you denied Windows access to your physical location, Internet Explorer won’t be able to share it. If not, you will need to:
- Click on the gear icon at the top right.
- Go to Internet options.
- Go to the Privacy tab.
- Check the option ‘Never allow websites to request your physical location’.
Disabling Geolocation Does Not Prevent IP Sharing
Although you can block geolocation and therefore prevent your physical location from being shared through browser definitions, the same is not valid for your IP.
It is extremely difficult to determine an exact location through an IP address. However, the IP address does indicate the surrounding area from which the internet is being accessed. What’s most problematic is that the IP is public, so websites will see it every time you access them. That's how American Netflix knows if you’re accessing it outside the country. In cases like these, the best way to stay private is by using a VPN.
A VPN will mask your IP and will show its own server’s IP instead, making it impossible for third parties to know your IP address.