Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

As always, I would like to thank all of your help and assistance in advance.

I am looking for a way to automatically redirect a user to a site and maintain the redirect site as the referral site. Let me explain the process and what is needed in a step by step format.

  • User clicks on a desired link in an email
  • User is navigated to
  • User is automatically redirected to
  • sees as the referral site
  • Data is gathered via Google Analytics

I am unsure as if this PHP code will take care of it, or not -

header("Location:", true, 303);

I could test and that is most likely what I am going to do. But I would like to understand a little more as to WHY this would or WHY this wouldn't work.

share|improve this question

I believe that the "Referer" field is controlled on the client browser. There is nothing that you can do to guarantee that the operation that you want will happen. Browsers can choose to send a fixed/false referer or none at all.

The RFC does not seem to indicate that the referer needs to be preserved either way.

Because the source of a link might be private information or might reveal an otherwise private information source, it is strongly recommended that the user be able to select whether or not the Referer field is sent. For example, a browser client could have a toggle switch for browsing openly/anonymously, which would respectively enable/disable the sending of Referer and From

share|improve this answer

I don't think it will work the way you want it too. The referer header is controlled by the client. Most browsers only set the referer if you click on a link. They do not set it on redirects.

If a person clicked on a link in Google that linked to, would show them as coming from google. If they typed in they would be redirected and the referer would be blank.

Perhaps you could set up logging on and find out how many people get redirected to

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.