Stop rewriting URLs in search results
November 8, 2011 10:06 AM   Subscribe

How do I prevent Google from rewriting URLs in search results?

When I search for things on Google, I get a list of search results. On the search results page, the URL may appear to me, the user, as:

Example Search Results
www.example.com

but if I right-click the result to copy the link, I get something like

http://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=13&ved=0CC0QFjACOAo&url=http%3A%2F%2Fwww.example.com%2Fearch%2Flexamampleay%2FLFDasdcalay%2FLFdissdc-short-sub.DW65TpH1C4LkiAKG_cTdBA&usg=AFQjCNHWDxjWNwF8I6PL4XSv3zmGKN8ghQ&sig2=5Nf4xjULuTq1hLh9XmkjVQ

This is really, really awful. HOW DO I PREVENT THIS FROM HAPPENING KTHXBAI
posted by fake to Computers & Internet (24 answers total) 4 users marked this as a favorite
 
I really don't think you can. Google does this so they can track which results people actually click on, so they can feed that information back into tuning their search ranking.
posted by Good Brain at 10:19 AM on November 8, 2011


Related. I don't have a working greasemonkey script for this any more. It used to work, and before that, customizegoogle (firefox addon) used to work. There is probably a working greasemonkey script out there someplace.
posted by cashman at 10:34 AM on November 8, 2011


Response by poster: Thanks, cashman. If I can do it without greasemonkey, great, but I'm willing to go that far if nothing else comes along.
posted by fake at 10:37 AM on November 8, 2011


Greasemonkey + that script still works. I had unknowingly uninstalled (or not reinstalled) greasemonkey when I went to update to FF7 a while ago.
posted by cashman at 10:56 AM on November 8, 2011 [1 favorite]


Why is this awful to you?

It really is actually beneficial because it'll help make YOUR specific 'style' of search more efficient (not to mention helping to filter bad results/spam/etc).
posted by chrisfromthelc at 12:19 PM on November 8, 2011


OT: chrisfromthelc, it breaks right click and "been there" highlighting, and as Google's search result quality deteriorates it isn't clear to me that they're using the information I'm already giving them. Like: where did the "never show me a result from foodnetwork.com ever ever again" button that they used to have go?
posted by straw at 12:36 PM on November 8, 2011


chrisfromthelc: "Why is this awful to you?

It really is actually beneficial because it'll help make YOUR specific 'style' of search more efficient (not to mention helping to filter bad results/spam/etc)
"

Because it makes it a bazillion times harder to just copy and paste a simple URL.

straw: "where did the "never show me a result from foodnetwork.com ever ever again" button that they used to have go"

If you visit a site through search results then hit back really quickly it should be an option.

cashman: "Greasemonkey + that script still works. I had unknowingly uninstalled (or not reinstalled) greasemonkey when I went to update to FF7 a while ago"

This better be true :)
posted by turkeyphant at 2:04 PM on November 8, 2011


This URL gives Google a lot of embedded information about where you were when you clicked the link.

The best answer, I think, is to left-click the link, go there, and then copy the actual URL from the address window at top.
posted by megatherium at 3:20 PM on November 8, 2011 [1 favorite]


megatherium: "This URL gives Google a lot of embedded information about where you were when you clicked the link.

The best answer, I think, is to left-click the link, go there, and then copy the actual URL from the address window at top
"

Depending on the page and your computer that takes an order of magnitude longer. I'm certainly not the only one infuriated by how a basic function (copy URL) is borked by Google and the amount in inconveniences me on a daily basis.
posted by turkeyphant at 4:43 PM on November 8, 2011 [1 favorite]


Why would anyone need to reference (copy) a URL that they haven't visited?
posted by gjc at 5:21 PM on November 8, 2011


Why would anyone need to reference (copy) a URL that they haven't visited?

To do a site: operator search. Find the official site of some place, and do a search of just that site. Or, you might want to open the page without people seeing the search terms that led you in there. Lots of reasons really.
posted by cashman at 5:26 PM on November 8, 2011 [2 favorites]


For what it's worth, the destination URL is there in the url= part, lightly escaped. It'd be relatively simple to write an addon / script to rewrite the links to just be the destination URL again. Maybe someone's done it already? I couldn't find a Chrome extension but I didn't look very hard.
posted by Nelson at 5:35 PM on November 8, 2011


Response by poster: Why would anyone need to reference (copy) a URL that they haven't visited?

You know, this is about answers, not your questions. But here's an example: I've visited the URL before, but want to copy/paste it into an email to share with someone.

Chrisfromthelc, it's perfectly possible for google to click-track without rewriting URLs.

I really appreciate the people who tried to answer the question. Still looking for the "install removegooglelinkrewrite firefox extension" answer to this, if there is one.
posted by fake at 8:29 PM on November 8, 2011


Mod note: Yes, unless you need more info from the OP in order to help understand the terms of the query, please stick to answering the question. Thanks.
posted by taz (staff) at 11:00 PM on November 8, 2011


Best answer: Here's a more current GM userscript. I just installed it and it seems to work.
posted by estherbester at 11:19 PM on November 8, 2011


Response by poster: Here's one solution.

Chrome supports Greasemonkey userscripts without installing Greasemonkey (wow). Click estherbester's link, click install, and done.
posted by fake at 4:18 AM on November 9, 2011


gjc: "Why would anyone need to reference (copy) a URL that they haven't visited"

What a ridiculous question. First of all, the OP obviously has reason to else they would not have asked and secondly, it takes a moments thought to come up with dozens of examples...

fake: "Why would anyone need to reference (copy) a URL that they haven't visited?

I really appreciate the people who tried to answer the question. Still looking for the "install removegooglelinkrewrite firefox extension" answer to this, if there is one
"

If you're willing to install an extension, why not make it Greasemonkey? It's lightweight and both the scripts linked in this thread seem to work on Firefox 7.
posted by turkeyphant at 4:23 AM on November 9, 2011


Response by poster: Have had Greasemonkey-related performance issues in the past.

Update: I installed the Greasemonkey userscript linked by estherbester into Google Chrome.

It stops many of the URL rewrites, but not the ones that bug me the most, which are the ones that happen when a PDF is in the result.

At this point, I may start tinkering with my own script.
posted by fake at 4:44 AM on November 9, 2011 [1 favorite]


Switch to Scroogle.

It provides you with the exact same Google search results, but minus the tracking, the JavaScript, the ads, and the 18 months of search history that Google tied to your unique browser fingerprint.
posted by -1 at 10:23 AM on November 9, 2011 [3 favorites]


HOW DO I PREVENT THIS FROM HAPPENING

You could use Bing.
posted by banshee at 11:31 AM on November 9, 2011


fake: "It stops many of the URL rewrites, but not the ones that bug me the most, which are the ones that happen when a PDF is in the result. "

Seems to work okay for that here on Firefox 7.
posted by turkeyphant at 5:33 AM on November 10, 2011


Via Matt Cutts's site, here's his explanation of what to do to get this functionality but only with your browser's built-in search text box. This will alter/create the/a Google search parameters for your browser ("create" in the case of Chrome because it won't let you change the search settings for its Google search entry) so that it always returns a search URL that is the bare-bones version you want.

I use Chrome, so I had to add a new search entry in "Options/Basics/Search/Manage Search Engines". I called it "Google Clean". You can use any keyword you want—I used "google-clean". And the query URL should be:
{google:baseURL}search?q=%s
Here's a screenshot showing how it looks when you fill in the fields.

Then you'll want to set it as the default search engine when you search via the Chrome omnibox. (With Firefox or IE, it would be your browser's web search box.) Once you've done that, it should appear at the top, as your default search engine.

Here I'm about to do a test search from the ombibox; and here are the results. You can see the bare search URL in the address bar.

This only solves the problem when you search via your browser's built-in web search functionality. If you browse to Google Search directly, you'll still end up with the crufty, long URL.

To clean up one of those after you've searched via Google directly, then you'll want to use something like the bookmarklet here.

For posterity (in case that page becomes unavailable), here is that bookmarklet's code:
javascript:(function(){var queryString=window.location.search.substring(1);var domainName=window.location.hostname;var myPathname=window.location.pathname;if(myPathname.length<2>hashPosition+1){queryString=window.location.hash.substring(1);}}var searchArray=queryString.split('\&');var mySearch='';for(myElement in searchArray){if(searchArray[myElement].match(/^q=/)){var mySearch=searchArray[myElement];}}var searchOnly='http://'+domainName+myPathname+mySearch;with(window.open()){self.location.href=searchOnly;document.close();}})()
You'll want to be sure there are no line-breaks in that.
posted by Ivan Fyodorovich at 7:30 PM on December 10, 2011


You're using Chrome? Try Google Tracking-B-Gone. It seems to work on PDFs here. (Oddly, it doesn't seem to work in Firefox 7.)

I think Ivan Fyodorovich is working on a separate problem, discussed in Metatalk, which broadened into also discussing this problem.
posted by Pronoiac at 2:15 PM on December 11, 2011


Oh, right. D'uh.
posted by Ivan Fyodorovich at 2:39 PM on December 11, 2011


« Older Do milk, honey, and other similar animal products...   |   This Old House needs an inspector? Newer »
This thread is closed to new comments.