Home ยป Turning off Google search results indirection

Turning off Google search results indirection

Solutons:


Author’s note (July 2016): The answer below was written in 2011, and is still working in Google Search. I have published new extensions that use a different method to remove the search result indirection, which works on even more Google sites and on mobile.

TL;DR: Don’t track me Google is a user script Don’t track me Google is an extension I made that allows you to copy normal URLs, while hiding the referrer to the sites you’re visiting.

Installation

  • “Don’t track me Google” at the Chrome Web Store (updated in 2016).
  • “Don’t track me Google” for Firefox (desktop & Android) (since 2016).
  • “Don’t track me Google” at Userscripts.org (works in Google search only, not updated any more)

Explanation

I have written a method which replaces the link-modifying rwt function with a bogus function that can’t be touched by Google.

By preventing Google from overwriting the rwt function, the link cannot be modified any more. This method depends on the Object.defineProperty method (Firefox 4+ and Chrome 5+). The fallback requires Firefox 2+ and Chrome 1+.

Firefox 2+

If you only want to remove the link-modifying behaviour, and not care about showing your search queries through the referrer, this GreaseMonkey script can be used:
(very non-strict @include rules using wildcards and the Magic TLD)

// ==UserScript==
// @name           Don't track me Google
// @namespace      Rob W
// @include        http://*.google.tld/*
// @include        https://*.google.tld/*
// @version        1.2
// @grant          none
// ==/UserScript==

"use strict";
if (Object.defineProperty) {
   Object.defineProperty(unsafeWindow,"rwt", {value: function(){return !0;}, writable: false });
} else {
   unsafeWindow.__defineGetter__('rwt',function(){return function(){return !0}});
}

Google Chrome does not support Magic TLDs, so the closest you can get is *://*.google.com/* (repeat the rule, replace .com with other supported Google TLDs).

In Chrome, scripts have to be injected in the form of a <script> tag, because Content scripts are executed in an “isolated world”.

Chrome & Firefox 2+ – Link to source code

On January 21st, 2012, I published an extended version, which includes a referrer-hiding method, so that others cannot see your search query. This greatly improves your privacy.

  • The mechanism is explained at this answer on Stack Overflow.
  • Additional details are available at the source code and Don’t track me Google description, a user script which fixes the URIs and hides the referrer.

(Update from 2016: this referrer hiding is not needed any more in modern browser because of the referrer policy, which only shows the domain in the Referer header)

See if the userscript found here for Google search works for you. I have been using it for a while now, and it’s been working more often than not for me.
enter image description here

Edit: Here is an addon for Firefox: Google search link fix

Appears the rwt function is invoked upon onmousedown, and thereby rewriting the href. If we could override this behaviour, then we should be set.

In firefox I inserted the following JavaScript into a bookmarklet which can then be executed anytime I wish to prevent the (slighly annoying) link-rewriting on a given Google SERP:

javascript:function rwt(a,f,g,l,m,h,c,n,i){return a};

Edit: Great to see that the userscript @Rob has created and included in his reply takes advantage of this snippet, highly recommended!

Related Solutions

Don’t understand how my mum’s Gmail account was hacked

IMPORTANT: this is based on data I got from your link, but the server might implement some protection. For example, once it has sent its "silver bullet" against a victim, it might answer with a faked "silver bullet" to the same request, so that anyone...

What is /storage/emulated/0/?

/storage/emulated/0/Download is the actual path to the files. /sdcard/Download is a symlink to the actual path of /storage/emulated/0/Download However, the actual files are located in the filesystem in /data/media, which is then mounted to /storage/emulated/0...

How can I pass a command line argument into a shell script?

The shell command and any arguments to that command appear as numbered shell variables: $0 has the string value of the command itself, something like script, ./script, /home/user/bin/script or whatever. Any arguments appear as "$1", "$2", "$3" and so on. The...

What is pointer to string in C?

argv is an array of pointers pointing to zero terminated c-strings. I painted the following pretty picture to help you visualize something about the pointers. And here is a code example that shows you how an operating system would pass arguments to your...

How do mobile carriers know video resolution over HTTPS connections?

This is an active area of research. I happen to have done some work in this area, so I'll share what I can about the basic idea (this work was with industry partners and I can't share the secret details ๐Ÿ™‚ ). The tl;dr is that it's often possible to identify an...

How do I change the name of my Android device?

To change the hostname (device name) you have to use the terminal (as root): For Eclair (2.1): echo MYNAME > /proc/sys/kernel/hostname For Froyo (2.2): (works also on most 2.3) setprop net.hostname MYNAME Then restart your wi-fi. To see the change, type...

How does reverse SSH tunneling work?

I love explaining this kind of thing through visualization. ๐Ÿ™‚ Think of your SSH connections as tubes. Big tubes. Normally, you'll reach through these tubes to run a shell on a remote computer. The shell runs in a virtual terminal (tty). But you know this part...

Difference between database vs user vs schema

In Oracle, users and schemas are essentially the same thing. You can consider that a user is the account you use to connect to a database, and a schema is the set of objects (tables, views, etc.) that belong to that account. See this post on Stack Overflow:...

What’s the output of this code written in java?

//if you're using Eclipse, press ctrl-shift-f to "beautify" your code and make it easier to read int arr[] = new int[3]; //create a new array containing 3 elements for (int i = 0; i < 3; i++) { arr[i] = i;//assign each successive value of i to an entry in...

How safe are password managers like LastPass?

We should distinguish between offline password managers (like Password Safe) and online password managers (like LastPass). Offline password managers carry relatively little risk. It is true that the saved passwords are a single point of failure. But then, your...

Can anyone tell me why this program go to infinite times?

while (i <= 2) { while (i > 0) { a = a + b; i--; <- out the inner while loop when i = 0 } printf("%d", a); i++; <- at here, the i==0 each time, so infinity loop } Because your nested loop always restores the value of i to 0, And 0 <= 2 is always...

How to conditionally do something if a command succeeded or failed

How to conditionally do something if a command succeeded or failed That's exactly what bash's if statement does: if command ; then echo "Command succeeded" else echo "Command failed" fi Adding information from comments: you don't need to use the [ ... ] syntax...

How to turn JSON array into Postgres array?

Postgres 9.4 or newer Obviously inspired by this post, Postgres 9.4 added the missing function(s): Thanks to Laurence Rowe for the patch and Andrew Dunstan for committing! json_array_elements_text(json) jsonb_array_elements_text(jsonb) To unnest the JSON array....

Implementing a 2D destructible landscape (like Worms)

I don't know how the landscape in worms was implemented exactly, but I'm pretty sure they used a bitmap for the landscape (at least in the older games of the series). A very basic approach would be a bitmap image (B/W) where black pixels represent air and white...

Huge procedurally generated ‘wilderness’ worlds

I think I better understand what you are asking now. Noise is not random - it's random-looking but is completely based on a mathematical formula and is repeatable. All the information is encoded in the formula. This means that you can have a formula that...