I\'ve noticed that if a foreign https:
site links to my non-https site, that I don\'t get anything in the HTTP Referer header at all. I\'ve experienced this with <
You should check this answer : Get referrer URL - visitors coming from Paypal (HTTPS)
In case your site uses HTTP (not HTTPS) and the referer uses HTTPS, there is no Referrer being sent!
HTTP RFC - 15.1.3 Encoding Sensitive Information in URI's states:
Clients SHOULD NOT include a Referer header field in a (non-secure) HTTP request if the referring page was transferred with a secure protocol.
So the only way to get the Referrer is to use HTTPS on your site.
To get the document.referrer
, You can use either of the options below:
You Need to convert your HTTP site to HTTPS.
Or you can add the below simple meta tag in your HTTPS site.
<meta name="referrer" content="always">