Welcome to WebmasterWorld Guest from 54.161.201.189

Forum Moderators: Ocean10000 & incrediBILL & phranque

How to redirect & not pass referrer information?

   
7:15 pm on Mar 20, 2007 (gmt 0)

5+ Year Member



What is the best way (with Apache) to redirect a URL and not pass along any of the referring information?

I need to redirect a page to a partner website, but I don't want to give them any stats/referrer information. I tried a 302 redirect, but it seems to still pass along the information. Any tips?

7:25 pm on Mar 20, 2007 (gmt 0)

WebmasterWorld Senior Member jdmorgan is a WebmasterWorld Top Contributor of All Time 10+ Year Member



The HTTP_REFERRER is part of the client browser request, and is therefore not under your control. The decision to pass or not pass a referrer rests with the user.

Jim

8:05 pm on Mar 20, 2007 (gmt 0)

5+ Year Member



You are suggesting that I can't set-up a redirect where the partner website I'm sending the traffic would only see the redirect as the source?

For example... domain.com/redirect/

All I want them to see is the redirect URL domain.com/redirect/ - not which page etc.. it came from on my website. Basically...I just don't want to give them a bunch of data they could use for their benefit.

1:55 am on Mar 21, 2007 (gmt 0)

WebmasterWorld Senior Member jdmorgan is a WebmasterWorld Top Contributor of All Time 10+ Year Member



A redirect tells the client (browser), "That content has moved, ask for it at this new URL" and provides the new URL. The client then re-requests the originally-desired content from that new URL, and (unless the user has taken steps to prevent it) provides the same referrer as with the original request.

So, I'm not suggesting anything, I'm stating a fact... Redirects don't "hide" a referrer.

Jim

2:57 am on Mar 21, 2007 (gmt 0)

10+ Year Member



Maybe if you redirect them to a real page on your server and use a META HTTP-EQUIV REFRESH... tag (with a content > 0) on that page to redirect, the browser may change it's referral info to the page URL that contains the META tag, but HTTP redirects given by a Location: header only tell the browser to resubmit the entire request (headers and POST data) to the new location.

note: bots typically ignore META REFRESH tags.

You can't modify it either since the browser supplies it -- to do that, you would have to proxy the request, ie: make the request yourself on behalf of the initial browser (setting your own referral tag), and then return the response.

10:06 pm on Mar 21, 2007 (gmt 0)

5+ Year Member



thanks for the info.

i could possibly do a meta refresh because in this instance i don't need bots to follow it...but aren't meta refreshes kind of shady?

10:14 pm on Mar 21, 2007 (gmt 0)

10+ Year Member



META REFRESH - Probably no more shady than trying to tweak a referrer :)

It's a client-side redirect, 'tis all -- It carries a similar risk factor as client-side JavaScript, and as such, may be blocked (ignored) by the client's popup blocking logic.

 

Featured Threads

My Threads

Hot Threads This Week

Hot Threads This Month