The referrer, or HTTP referrer — also known by the common misspelling referer that occurs as an HTTP header field — identifies, from the point of view of an Internet webpage or resource, the address of the webpage of the resource which links to it. By checking the referrer, the new webpage can see where the request originated.
Questions tagged [http-referer]
564 questions
27
votes
2 answers
What is the HTTP Referer if the link is clicked in an
Suppose I have a webpage located at http://www.website.com with an

bodacydo
- 75,521
- 93
- 229
- 319
26
votes
4 answers
Notice: Undefined index: HTTP_REFERER
Notice: Undefined index: HTTP_REFERER
$http_referer = $_SERVER['HTTP_REFERER']
i used this from tutorial.and it looks okay
also code is calling it from including file
what should i change?
i added print_r($_SERVER); and now page gives me this
Array…

Mojtaba
- 733
- 4
- 12
- 26
19
votes
4 answers
Make browser submit additional HTTP-Header if click on hyperlink
Is there a way to make the webbrowser submit additional HTTP header if the user clicks on a link?
Background: In our environment every http-request has a unique ID on the server side. See…

guettli
- 25,042
- 81
- 346
- 663
18
votes
8 answers
Is it possible to capture search term from Google search?
This may be a stupid question, but is it possible to capture what a user typed into a Google search box, so that this can then be used to generate a dynamic page on the landing page on my Web site?
For example, let's say someone searches Google for…

johnnyb10
- 760
- 3
- 9
- 21
18
votes
2 answers
Email Tracking - GMail
I am creating my own email tracking system for email marketing tracking. I have been able to determine each persons email client they are using by using the http referrer but for some reason GMAIL does not send a HTTP_REFERRER at all!
So I am trying…

Abs
- 56,052
- 101
- 275
- 409
18
votes
5 answers
Redirect to referer url in codeigniter
In messaging system of my project when you get a message from a user you a email alert saying that the another user has sent a message to view the message click here (i.e the url of message) So if the user is not logged in to system he gets redirect…

Prathamesh mhatre
- 1,015
- 5
- 17
- 32
17
votes
1 answer
Why have Origin and Referer headers when Referer has enough information?
If the Referer header has the Origin in it anyway, what is the point of having both?
If the server receiving an HTTP request wants to know the Origin, it can just look at the domain in the Referer header.
I understand that the Referer header is not…

David Klempfner
- 8,700
- 20
- 73
- 153
17
votes
3 answers
How to save http referer in rails
I'm trying to save the site that a user came from when they sign up. Right now I have a before_filter in my ApplicationController:
before_filter :save_referer
def save_referer
unless is_logged_in?
session['referer'] =…

TenJack
- 1,594
- 4
- 21
- 35
16
votes
2 answers
Setting HTTP_REFERER header in Django test
I'm working on a Django web application which (amongst other things) needs to handle transaction status info sent using a POST request.
In addition to the HTTP security supported by the payment gateway, my view checks request.META['HTTP_REFERER']…

supervacuo
- 9,072
- 2
- 44
- 61
14
votes
4 answers
how to get referrer from a redirected url
I have an url
domain.com/a
which redirects to
domain.com/controller/action/a .
How do I get the referrer (i.e domain.com/a) in my action for domain.com/controller/action/a ?
One option was to add the referring domain as a parameter…

Prabesh Shrestha
- 2,732
- 4
- 29
- 44
14
votes
2 answers
Alternative for $_SERVER['HTTP_REFERER'] PHP variable in MSIE
I have used $_SERVER['HTTP_REFERER'] variable in my application (used PHP).
On Firefox above variables is wokring. But i observed that $_SERVER['HTTP_REFERER'] is not working on Microsoft Internet Explorer 8.
I also got to know that HTTP_REFERER…

pravin
- 2,155
- 8
- 37
- 49
13
votes
2 answers
Specifying HTTP referer in embedded UIWebView
In my app, I allow the user to open up an external page in an embedded UIWebView. Is it possible for me to set the referer header that's sent with that request? I'd like for my app to get the 'cred' when the user opens up these external pages.

Edward Dale
- 29,597
- 13
- 90
- 129
13
votes
3 answers
ASP.NET - Response.Redirect Not Populating Url Referrer
I feel like i've done this a ton of times, but i can't for the life of me figure out what is going wrong.
Default.aspx:
protected void Page_Load(object sender, EventArgs e)
{
var r1 = Request.UrlReferrer; // null
var r2 =…

RPM1984
- 72,246
- 58
- 225
- 350
13
votes
8 answers
How does refer(r)er work technically?
I don't understand: how are webserver and trackers like Google Analytics able to track referrals?
Is it part of HTTP?
Is it some (un)specified behavior of the browsers?
Apparently every time you click on a link on a web page, the original web page…

NoozNooz42
- 4,238
- 6
- 33
- 53
12
votes
1 answer
Referer missing in HTTP header of Selenium request
I'm writing some tests with Selenium and noticed, that Referer is missing from the headers. I wrote the following minimal example to test this with https://httpbin.org/headers:
import selenium.webdriver
options =…

finefoot
- 9,914
- 7
- 59
- 102