Home > Technical & Creative Skills > Programming, Servers & Scripts

Help with hiding Referrer (5)


01-18-2019 09:19 AM #1 earthbean (Member)
Help with hiding Referrer

Hi,

Who can help me in a direction of hiding referrer in a redirect.

Situation:
Link A on click go to my server then redirects B to C, right now i block referrer traffic and divert it. But would love to have that 5% of extra traffic that does have referrer.

What do i use:
- PHP redirect 301
- I divert traffic from https:// to http:// back to https://

My issue
The referrer where Link A is posted is showing up in referrer stats on C

I'm no allowed to use:
- Javascript redirects
- META-Refresh

Also tried various .htaccess stuff like this "Header set Referrer-Policy "no-referrer-when-downgrade"" without success. Maybe i do something wrong or just focusing on the wrong stuff.

If my question is unclear please give a shout i'll try to make it more clear

Cheers!


01-18-2019 09:31 AM #2 zeno (Administrator)

You're a bit limited if you won't use an intermediate page + meta/JS redirects. You have little control server-side over the referrer a browser sends hence why client-side methods get used.

You could try this:

1. Add <meta name="referrer" content="no-referrer"> to the lander <head> area.
2. Put rel="noreferrer" on your outgoing CTA links
3. Serve the lander via HTTPS, have the CTA links use HTTP

I don't think you'd need PHP redirection after this but you could add it just to check for referrer as you mention and bounce if present.


01-18-2019 12:06 PM #3 earthbean (Member)

Hi Zeno,

Thanx for replying so quickly! Awesome! Any idea when i don't use a lander but just a plain redirect. It's just to cloack the traffic and divert it directly from google to for instance an advertiser

I've read many articles for instance: https://moz.com/blog/meta-referrer-tag
But found out that traffic from a search-engine with parallel tracking gives referrer however i use this kind of blocking options.

Cheers


01-18-2019 12:26 PM #4 zeno (Administrator)

If you are direct linking, the only sensible option is an intermediate page that uses JS/meta-refreshes.

The referrer is generally a browser-centric header, its not something you can just update/override with PHP easily as its not the job of a server to say where a user is coming from -- the browser is the authority on this.

Furthermore downstream pages can access the browser history API to effectively see what is in your back-button history list, which is separate to referrer. Hiding this is even harder.

To step back a bit here... why are you trying to hide referrer? Why can you not use JS/meta-refreshes? If you are runnning a non-compliant source, you better either use landers or use a better redirect method. You can't win every battle. If it's because you want to hide some info from the affiliate network (but are running compliantly, or maybe not), you should consider if this is even worth it or important. And again, if you refuse to use JS/meta-refresh options you'll sacrifice effectiveness, as simple as that.


01-18-2019 12:57 PM #5 earthbean (Member)

Hey Zeno,

Most of the time hiding referrer is not necessary thing, and also working with js or meta worked smooth. But lately i found out that google is suspending accounts using trackinglinks with js and meta

So when changing from meta + js to just plain 301 with https -> http -> https the referrer started to appear in some networks and the request us to remove them, so their clients don't see ;-)

thank you btw for replying so damn quickly!! You rock!


Home > Technical & Creative Skills > Programming, Servers & Scripts