TL;DR
Websites can detect your local WIFI network name (SSID) through JavaScript code accessing the browser’s WebRTC API. This doesn’t mean they can see *everything* on your network, but it reveals information about your location and connected devices. You can block this using browser settings or extensions.
How Websites Detect Your WIFI
Websites use a feature called WebRTC (Web Real-Time Communication) to establish direct connections between users’ browsers. A side effect of how WebRTC works is that it needs to list available local network interfaces, including your WIFI network name, to find the best connection route.
Steps to Block WIFI Detection
- Understand the Risk: Knowing your SSID can help pinpoint your approximate location. It’s a privacy concern, but not usually a security breach on its own.
- Check if Your Browser is Vulnerable: Most modern browsers are affected to some degree. The following steps will show you how to mitigate the risk in popular browsers.
Google Chrome
- Disable WebRTC Local IP Address Leakage: This doesn’t completely block SSID detection, but it makes it harder.
- Go to
chrome://flagsin your address bar. - Search for “WebRTC local IP address leakage”.
- Set the option to “Disabled”.
- Restart Chrome when prompted.
- Go to
- Use an Extension: Several extensions block WebRTC information from being shared.
- Search for extensions like ‘WebRTC Control’ or ‘uBlock Origin’ (with the correct filters enabled – see below).
- Install a reputable extension and configure it to block local IP addresses and network interfaces.
- uBlock Origin Filters: If using uBlock Origin, add these filters:
// Block WebRTC leaks network-interfaces:* webrtc://*
Mozilla Firefox
- Disable WebRTC: This is the most effective method, but may break some web applications that rely on WebRTC.
- Type
about:configin your address bar and press Enter. - Accept the risk warning.
- Search for “media.peerconnection.enabled”.
- Double-click the preference to set it to
false.
- Type
- Use an Extension: Similar to Chrome, extensions can help.
- Install a WebRTC control extension from the Firefox Add-ons store.
- Configure the extension as needed.
Microsoft Edge
- Edge is based on Chromium: The steps for Chrome apply to Microsoft Edge as well. Follow the instructions above for disabling WebRTC leakage and using extensions.
Safari (macOS)
- WebRTC is enabled by default: Safari doesn’t have a built-in setting to disable WebRTC directly.
- You can try using an extension designed for privacy, but options are limited.
- Consider using Firefox instead if you need more control over WebRTC settings.
Testing If a Website Can Detect Your WIFI
- Visit a Test Website: Use websites specifically designed to test WebRTC leaks, such as BrowserLeaks or IPLeak.net.
- Check the Results: These sites will show you if your local IP address and network interfaces (including your WIFI SSID) are being exposed.
- Repeat After Applying Changes: Test again after implementing the steps above to confirm that the detection is blocked.
Important Considerations
- VPNs Don’t Directly Block This: A VPN hides your IP address, but doesn’t prevent WebRTC from revealing your local network information.
- Public WIFI Networks: Be extra cautious when using public WIFI networks, as they are less secure and more vulnerable to this type of detection.
- Regularly Update Your Browser: Browser updates often include security improvements that can help mitigate WebRTC leaks.