After a decade of not using Google Analytics, we have finally caved. Google knows what everyone is doing anyway. The vast majority of websites now use Google Analytics, so we thought that a good post would be to show you how you can stop Google from tracking you… regardless of the websites you are looking at.
Block Google (or any other Cookie tracker) from your PC
Whilst sites like Majestic.com respect the “Do Not Track” option in browsers like Firefox, not all browsers let you set this option. I’ll edit this post if proved wrong, but according to this post, Chrome does not support Do Not Track. However, you can block tracking code at a much lower level on most computers. Doing so is a one-off change for you, and then you will have much more protection across the whole web if privacy is your thing.
WARNING! BACK UP THIS FILE (BELOW) BEFORE CHANGING, SO YOU CAN REVERT IF NEEDED
To create a copy (in case) Go to the Run/Command box and type:
1: Copy c:\windows\system32\drivers\etc\hosts c:\windows\system32\drivers\etc\hosts_backup
(Must be run as an Administrator)
2: Go to the Run/Command box in windows and open the Hosts file. This is usually done by typing:
“notepad c:\windows\system32\drivers\etc\hosts” (without quotes)
(Must also be run as an Administrator)
If you do this from a command screen, you are looking for something like this:
You should then see something a bit like this:
Then at the bottom of this file enter
127.0.0.1 <tab> the hostname you wish not to get any requests
So to block Google Analytics, add:
To block Doubleclick (Google’s remarketing cookie) add:
Save the file. The changes are immediate after saving. NOTE: If you see a “save as” window, you have not run this as an Administrator!
Who else can I Block?
Here is an (unverified) list of other trackers… this thread is WAY back from 2005, so maybe someone has a more up to date list for the comments?
I have a Mac/IPhone/Android!
No worries – there are many pages on the web that tell you how to do this on other operating systems. For example:
Blocking on Macs is described here
You cannot change this file on iPhones unless they are Jailbreaked, but some workarounds are discussed here.
I do not have an Android, but apparently you can block them too here.
Can I do this at the router level?
Life Hacker shows you how to block these annoying cookies at the router level, so ANY computer on the network should get blocked.
Latest posts by Dixon Jones (see all)
- Outbound Links and Language Data lands in the Historic Index. - November 22, 2017
- New Functionality: Outbound Links and Language Upgrade - October 23, 2017
- Majestic and SEMRush Combine Forces - October 11, 2017