The browser privacy handbook

Updated: February 6, 2022

This document is intended to help users configure their computers to protect their privacy while browsing the web. Easy stuff is at the beginning, and harder stuff is toward the end. This howto guide is intended for a general audience, so wording is necessarily simplified.

For the greatest benefit, use as many tools/methods as you can, in combination.

Table of contents

  1. Ad Blocking
  2. Cookie management
  3. Private browsing mode
  4. Do Not Track
  5. Pro-privacy search engines
  6. HTTPS Everywhere
  7. Disable the Java browser plugin
  8. Javascript blocking
  9. Compartmentation: Different browsers for different functions
  10. Useragent spoofing
  11. Encrypted DNS
  12. Google services tightening
  13. Social Networking
  14. Referers
  15. MVPS hosts file
  16. Additional hosts entries
  17. Tor
  18. VPNs
  19. SSH Tunnels
  20. Cover Your Tracks (formerly Panopticlick)
  21. Am I Unique?

Ad Blocking

Benefit: high

IANIX recommends uBlock Origin for ad blocking in Firefox. It is also available for Chrome.

In addition to giving users a cleaner and faster browsing experience, ad blocking reduces malware infections since advertising networks are infested with malware.

Cookie management

Benefit: medium/high

Cookies are just the tip of the iceberg, but still pose a real privacy danger. The "sweet spot" between privacy and functionality is to:

In Firefox: Preferences, Privacy. Select options to match above behavior.

In Chrome: Preferences, Privacy, Content Settings, Cookies:

Alternatively, with compartmentation, use a browser with all cookies disabled for normal browsing, and a different browser for sites that require cookies.

Private browsing mode / Incognito

Benefit: minimal

Private browsing mode is misleading — it mostly applies to privacy when using shared computers and provides minimal protection against web tracking.

In Firefox: Edit, Preferences, Privacy.
In Chrome: Menu bar, New Incognito Window

Do Not Track

Benefit: probably harmful to you, if anything

Do Not Track is a stupid idea. If you wanted to protect your home from robbers, would you:

  1. Put a note on your front door asking people not to rob you, or
  2. Install a solid hard wood or metal front door with long screws in the door frame and good locks

Best policy for Do Not Track: keep your web browser's default setting.

The kind of people you have to worry about don't care if you don't want to be tracked, and there's no legal incentive not to track you even if you say pretty please. Numerous companies have announced publicly that they won't respect Do Not Track, and again, the worst ones won't bother letting you know.

Sending a non-default Do Not Track request only makes your browser more unique and therefore more identifiable/trackable. Furthermore, the false sense of security can limit your motivation to implement real privacy controls.

Bottom line: don't ask your attackers for protection.

Pro-privacy search engines

Benefit: medium/high

Privacy-respecting search is crucial when companies such as Google offer search, webmail, and ubiquitous web tracking via Google Analytics and Tie it all together and you have just about everything. A privacy service once asked: Who knows more about its citizens: Google, or North Korea?

DuckDuckGo is a privacy-oriented search engine with good results. Have a look at DDG's page on tracking for more information. You can install a DDG search bar for Firefox or Chrome.

HTTPS Everywhere

Benefit: medium

The Internet's most loved freedom & privacy organization, The Electronic Frontier Foundation (EFF), has an addon for Firefox and Chrome called HTTPS Everywhere. Its goal is to automatically encrypt communication with websites known to support TLS. Once installed, it requires no configuration or upkeep. It works quietly in the background to protect you. In addition to the privacy benefit of increased encryption, it can also protect against some browser history attacks. It's a great tool!

Note: HTTPS Everywhere includes an option to rewrite all http references to https. Try it, you might like it!

Disable the Java browser plugin

Benefit: minimal
(Security benefit: high)

First, Java and Javascript are different technologies. They are not the same. If you block one, you don't automatically block the other.

Java can be used to compromise your privacy, and it isn't used by legitimate websites anymore. Disable it in the browser, and if you don't use it at all, uninstall it from your computer.

Javascript blocking

Benefit: high

Javascript has its uses, but the web would be dramatically safer, faster, and more anonymous without it. In addition to being used by a majority of exploits for browsers (in other words, it's terrible for security), it's also used by a large percentage of web stalkers. Consider having a browser with JS entirely disabled for regular browsing, and then another browser or two with JS enabled for sites that need it.

Option 1: use an addon that blocks most JS but allows major sites like Youtube to work. For Firefox there's NoScript and for Chrome there's apparently ScriptSafe.

Option 2: disable JS entirely. In the Firefox about:config page, set the variable javascript.enabled to false. Or for Chrome, go to Settings, Advanced, Site Settings, and disable JS there. Chrome can enable JS easily on a site-by-site basis by right clicking in the URL bar.

A side benefit of disabling JS is big bandwidth savings, making browsing a lot faster.

Different browsers for different functions

Benefit: medium/high

Using multiple browsers is helpful because each one has its own "fingerprint." The idea is to use one browser (e.g. Firefox) for general browsing, and another (e.g. Chrome) for any sites that strongly identify you (webmail, social networking, merchant sites). From a privacy standpoint, Chrome is best for sites you identify yourself to because it's the hardest to make privacy-aware. The point is to disassociate your general browsing from your identity (compartmentalization).

Useragent spoofing

Benefit: medium

Your web browser tells every website you visit unique details about it that can be used for tracking purposes. If you use a common platform (recent macOS, Windows, or a phone) then you're probably best off not switching the useragent. However if you use something uncommon like OpenBSD, then you can be seen from space.

Here are some real useragents from my webserver logs:

Which useragent tells trackers the least about itself? Clearly the second to last, as it gives no operating system, browser, or other software version information. However, many websites block connections from clients presenting an empty useragent ostensibly for "security."

Trackers can combine the useragent with other connection details to strengthen tracking. To "blend into the crowd" you can spoof a common useragent. This creates new problems though, as for instance the advertised HTTP_ACCEPT header won't match the useragent, exposing rather than hiding you.

To set a custom useragent in Firefox, go to the URL about:config and create a new string called general.useragent.override and give it a custom value. Choose one of an empty string, a generic string, or a very common one:

Please note: if a website refuses service to a browser with an empty useragent string, that's a strong signal that the site is either aggressively tracking users, run by inexperienced/incompetent sysadmins, or both. If this is a problem, simply delete the general.useragent.override string in about:config.

Encrypted DNS

Benefit: medium

Normally your ISP, and/or anyone nearby (if you're using open wifi), can easily compile your entire browsing history.

Currently, the best way to protect your DNS queries, both in terms of security and privacy, is to use DNSCrypt from OpenDNS.

Google services tightening

Benefit: high

It's best not to use Google services, if possible. However, if you do, it's best to:

Remember: If you don't pay for the product, YOU are the product.

Social Networking

Benefit: high

Social networking may be the single biggest source of tracking on the web. Most of the big sites have one or more "like" or "share" buttons which notify social networking trackers in real time of your browsing activity. For social networking, compartmentalize: Have one web browser (Chrome) that's just used for social networking, webmail, and merchant sites. Use another browser (Firefox) for all other browsing.


Benefit: high

When your web browser downloads an image or webpage, it tells the remote webserver where it "heard about" that image or page. This is a big problem for web browsing since the great majority of websites put trackers on their webpages. The result is that tracking companies receive your almost complete browsing history.

Using Firefox as an example, there are generally three options in web browsers for referrals:

  1. Never send referral information (best)
  2. Only send referral information on clicked links
  3. Always send referral information (default)

In Firefox, type into the URL bar and hit return:


You may see a joke (and it's only a joke) about voiding the warranty. Hit OK. Type into the search box:


Double-click on that option under "Preference name" and change the value to 0. Close the configuration page. Congratulations, now you're not sending your near-complete browsing history to tracking companies.

For Chrome, there an add-on that purports to remove referer info is Referer Control.

MVPS hosts file

Benefit: medium/high

A hosts file is just a text file that tells your computer where on the Internet to connect to certain hosts. The most common usage is to redirect unwanted sites to a sort of blackhole, so your computer won't actually talk to them. Kind of like a restraining order.

The best hosts file for such protection is the MVPS hosts file. The organization that hosts it has instructions on how to "install" the file. Use it!

Additional Hosts Entries

Benefit: medium/high

IANIX has a small but potent list for inclusion in your operating system's hosts file. The following items can be added to the same file modified by the MVPS hosts file, described above.


Benefit: high

Tor stands for The Onion Router. It's an anonymity network run by volunteers. The traffic of Tor users is routed through three hosts in addition to their own: an entry node, a relay, and an exit node. The entry node only knows the user (you) and the relay, but not the exit node or site you're connecting to; the relay only knows the entry node and exit node, but not you, or the site you're connecting to; and the exit node only knows the relay node and destination, but not the entry node or the person connecting to the destination site. The Tor website, linked above, has pictures of the network that may make this more clear.

It is recommended to use the Tor browser when browsing the web with Tor. This will help prevent information leakage.


Benefit: medium/high

VPN stands for Virtual Private Network. In the case of web browsing anonymity, a VPN is used like an SSH tunnel (below), except that all of the user's network traffic passes over the VPN. Many companies provide VPN access at reasonable rates.

But please note: running your own VPN, if possible, is a superior option for multiple reasons. If you can run your own VPN, consider WireGuard.

SSH Tunnels

Benefit: medium/high

An SSH tunnel can be used to provide security and anonymity, depending on how used. Since SSH is encrypted, it provides secrecy over the local network, and some level of security because its traffic cannot be modified by an attacker without the user's knowledge.

The more common usage, though, is to provide a channel that essentially "hides" the user's IP address from remote web servers. Such servers only see the SSH server, and not the user making the connection. Like VPNs, lots of SSH Tunnel services are available, and are typically cheaper than VPNs.

NB: To prevent DNS leakage you should tunnel your DNS queries, unless you're using DNSCrypt, which will provide DNS security and privacy. Go to about:config and type:


Then change the value from false to true.

Cover Your Tracks

Benefit: high, as an educational tool.

Cover Your Tracks (formerly Panopticlick) is a resource hosted by the EFF. It shows you your browser fingerprint and estimates how easy it is to identify you among all web users. Its function is to educate users, with the intention of helping them make informed decisions that protect their privacy.

With Firefox, it's easy to change browser configuration, such as by blocking cookies or JavaScript, and then redo the test to see how these changes affect the browser's fingerprint. Don't just read Cover Your Tracks, put it to use!

Am I Unique?

Benefit: high, as an educational tool. is another web browser fingerprinting site that shows information your browser freely gives to sites, allowing you to be stalked/tracked.

The main takeway from Cover Your Tracks and are that JavaScript is the single biggest threat to online privacy. Please consider disabling JS.

No-JS fingerprinting

Benefit: high, as an educational tool.

No-JS fingerprinting shows how browsers can be fingerprinted even without JavaScript.