2

On a google search page, if I right-click a URL and copy the URL, I will not copy the original URL by a google altered URL like the following

https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=3&cad=rja&uact=8&ved=2ahUKEwjeo_nF6fDkAhUREawKHWt1CKkQFjACegQIDBAG&url=https...

Is there a way to block this from happening?

2
  • 3
    The cynical answer would be "Don't use Google, use DuckDuckGo."
    – Tetsujin
    Commented Sep 27, 2019 at 11:02
  • 1
    Have you tested it in Chrome? I get normal links there... (Not sure if it's the default or because of something I've changed.) Firefox has altered ones, like in your example. Commented Sep 27, 2019 at 12:10

2 Answers 2

2

Yes. The link is changed when you interact with it. If you right-click on it, you will it see it change. The actual url is encoded in a parameter at the end.

So there are at least two solutions: one is to avoid having the link changed in the first place (for example with Google Search link fix the other is to decode it afterwards (for example with Clean Links).

1

Google Chrome:

In the most recent versions of Chrome (at least as far back as late 2018), you shouldn't be seeing this behaviour anymore. Google has replaced the modified URLs with the "ping" attribute - essentially the same tracking, but more user friendly.

Example (from the search results for "super user") - notice the ping="/url... part:

<a href="https://superuser.com/" ping="/url?sa=t&amp;source=web&amp;rct=j&amp;url=https://superuser.com/&amp;ved=2ahUKEwjn--HRg_PkAhVRIVAKHZRGDBUQFjAAegQIBBAB">

If your don't like this kind of sneaky tracking either, you can get rid of it with a browser extension such as Privacy Badger. But well, you're still using Google's browser...

Firefox

In Firefox, and probably all other non-Chromium browsers, you still get the modified links as described in the question. Now, the problem here is that they're created via client-side javascript triggered by onmousedown event.

This is what a search result looks like before you click the link:

<a href="https://superuser.com/" onmousedown="return rwt(this,'','','','1','AOvVaw3z0-wV2Li62qFFF2yyoNpP','','2ahUKEwiPodzJiPPkAhWVXhUIHeJgCFEQFjAAegQIBBAB','','',event)">

When you click it (including right-clicking to copy the URL), it immediately changes to

<a data-cthref="/url?sa=t&amp;rct=j&amp;q=&amp;esrc=s&amp;source=web&amp;cd=1&amp;cad=rja&amp;uact=8&amp;ved=2ahUKEwiPodzJiPPkAhWVXhUIHeJgCFEQFjAAegQIBBAB&amp;url=https%3A%2F%2Fsuperuser.com%2F&amp;usg=AOvVaw3z0-wV2Li62qFFF2yyoNpP" href="/url?sa=t&amp;rct=j&amp;q=&amp;esrc=s&amp;source=web&amp;cd=1&amp;cad=rja&amp;uact=8&amp;ved=2ahUKEwiPodzJiPPkAhWVXhUIHeJgCFEQFjAAegQIBBAB&amp;url=https%3A%2F%2Fsuperuser.com%2F&amp;usg=AOvVaw3z0-wV2Li62qFFF2yyoNpP" onmousedown="return rwt(this,'','','','1','AOvVaw3z0-wV2Li62qFFF2yyoNpP','','2ahUKEwiPodzJiPPkAhWVXhUIHeJgCFEQFjAAegQIBBAB','','',event)">

Since this is achieved by javascript, there's probably no native Firefox setting that would prevent this (please correct me if I'm wrong). However, as others have pointed out, there are multiple browser extensions which can be used to stop this behaviour.

Further reading:

Privacy Badger Now Fights More Sneaky Google Tracking

Note: I am not affiliated with Privacy Badger or the EFF in any way, except as a user of the browser extension.

1
  • 1
    Note: I've just noticed that the mention of Chrome has been removed from the question since yesterday, before I posted this answer. But I'm keeping that section anyway, since it's somewhat interesting. Commented Sep 28, 2019 at 8:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .