
Clean Links – Converts obfuscated or nested links to genuine clean links - based2
https://addons.mozilla.org/en-US/firefox/addon/clean-links/
======
pierrec
This seems to work pretty well on Google search results. If you haven't
noticed, Google search has this anti-feature bordering on the dark pattern
where hovering a link shows the correct destination URL but right-clicking it
(eg. to copy the destination URL) instantly replaces it with an nested Google
redirect (I assume they're doing this for the tracking, statistics, etc.)

~~~
greglindahl
The google redirect does tracking and referer hiding. You'll want to be sure
that your browser does referer hiding if you go direct to the link.

~~~
jessriedel
Can someone explain why my browser provides referer info at all? Why isn't
this a permission I need to give away? What common features that the _user_
needs on the web rely on it?

~~~
chestnut-tree
If you are using Firefox, you can disable referrer info without using a
plugin. Here‘s how:

In the URL bar, type the following and press enter:

    
    
      about:config
    

Now search for the following entry on the page:

    
    
      network.http.sendRefererHeader
    

The default value is 2. Change this to 0. This disables the referrer header.

Note that some sites won‘t allow you to sign in or register if the referrer
header is disabled (e.g. Pinterest), so you may have to temporarily enable the
referrer header in those instances.

A final point is that this Firefox setting obviously has no effect if referral
info is already appended to the URL (as is the case with Google search
results).

~~~
LukeShu
Alternatively, you can instead set

    
    
        network.http.referer.spoofSource
    

The default value is false. Change it to true. This causes Firefox to instead
submit the website being requested as the referrer; leaking no information,
but breaking fewer sites.

------
Sylos
> About the Developer:
    
    
      Name 	     Diego Casorran
      Homepage   http://goo.gl/eyC52
    

The irony is strong with this one...

------
c0nducktr
This addon currently does not work with e10s / multi-process, just fyi for
anyone trying it on a beta/alpha/nightly build of Firefox.

------
mungoman2
That's awesome! This is needed for Chrome as well.

~~~
gregsadetsky
I just found & installed the "Copy Real Url" [1] Chrome Extension which adds a
context menu item to copy the 'clean' url on Google and other sites. It works
well and the code is simple and short.

[1] [https://chrome.google.com/webstore/detail/copy-real-
url/opel...](https://chrome.google.com/webstore/detail/copy-real-
url/opelelcojgjgddbfhlolihhdmjodmjdf)

------
Animats
We do some of that in Ad Limiter, for some ad links. We want to know the real
destination site so we can rate it for legitimacy. Ad Limiter puts the real
destination URL back into the DOM, so if the user does click on the ad, ad
tracking is bypassed. This is just a side effect of rating. But if users like
it, we could do more of this.

I'd considered making HEAD requests for all ad links to try to track through
all the redirectors and ad services to the final site. That would probably
result in lots of fake clicks for advertisers, though. There's also the
question of what ad networks do with a HEAD request. Time to look at this
again and run some tests.

------
unicornporn
Why isn't this working on mobile Firefox? The install button is greyed out for
me.

~~~
Sylos
Replace "firefox" in the URL with "android", then it works.

Alternatively, just go the usual route of Menu->Tools->Add-ons->"Browse all
Firefox Add-ons"->Search for "Clean Links"...

~~~
monorailz
Thank you. Paying it forward by putting the link here.

[https://addons.mozilla.org/en-US/android/addon/clean-
links/?...](https://addons.mozilla.org/en-US/android/addon/clean-
links/?src=search)

------
jacquesm
Very useful. Sad that this needs to be fixed using a plug-in or extension.

~~~
skbohra123
Be thankful that we still have plugins legal.

------
justinmayer
For Safari, I use the following extensions, which provide similar (but not
identical) functionality:

[http://canisbos.com/directlinks](http://canisbos.com/directlinks)

[https://github.com/grahams/safari-utm-
stripper](https://github.com/grahams/safari-utm-stripper)

------
JadeNB
How does this differ from [https://addons.mozilla.org/en-
US/firefox/addon/google-search...](https://addons.mozilla.org/en-
US/firefox/addon/google-search-link-fix) ?

~~~
gruez
it works on sites other than google?

~~~
JadeNB
> it works on sites other than google?

Despite the name, so does the one that I linked. (I only see a mention of
Yandex in the description, but I could have sworn it works on any page using
the same tricks.)

------
heinrich5991
How does this work? Does this just look for things that look similar to URLs
in the parameters?

Especially: How does the unshortener work?

~~~
JadeNB
See hackernews2000's
([https://news.ycombinator.com/item?id=12064870](https://news.ycombinator.com/item?id=12064870))
very nice comment.

------
Too
There is another extension called redirector that does the same thing. Anyone
knows of the differences?

~~~
hackernews2000
Redirector
([https://github.com/einaregilsson/Redirector/](https://github.com/einaregilsson/Redirector/))
lets you create your own rules for all kinds of purposes and have complete
control over them (including by testing them against different URLs).

The subject of this thread seems to come preloaded with some a bunch of URLs
and strings and doesn't let you create separate manipulation rules. It's
literally just a "cleaner".

Compare OP's link:
[https://i.imgur.com/CZPkRYD.png](https://i.imgur.com/CZPkRYD.png)

To Redirector's power and reflexibility:
[https://i.imgur.com/lYb9DtQ.png](https://i.imgur.com/lYb9DtQ.png)

As you can see, what Clean Links does can be done with a single Redirector
rule, while having the power to create as many others as you want.

------
rcarrigan87
How would this affect affiliate tracking on a site like Kayak or priceline?
Wouldn't it scrub over the affiliate id? Seems like that could be a major
headache for sites that use URLs to track referrals/sales.

~~~
TheRealPomax
Nature of the web, really. As a website, you control the content you send out
to the user, but that's where it ends. If the client rewrites the content as
per the user's needs or wants, that's out of the site owner's control (unless
you want an arms race, of course, in which case it's pretty much lost by
default for site owners vs all users on the planet)

~~~
cobbzilla
the only way I can see around this would be to give every affiliate a unique
hostname on the target domain. then the site owner would identify the
affiliate using the hostname of the incoming request. next step in the arms
race would then be for an addon to understand per-domain rules for rewriting
hostnames. lather, rinse, repeat.

------
JustinAiken
Anything similar for Chrome?

