1

When someone arrives on my site, I want to check whether they came from Gmail, Outlook.com or Hotmail.com. I installed Fiddler, but I can't find a the referrer hostname anywhere when I come from Gmail. Is a referrer hostname even passed for these mail clients?

Adam
  • 6,041
  • 36
  • 120
  • 208

3 Answers3

2

Browsers don't pass the URL in the Referer field if it is an https:// URL, because it might contain private information. From RFC 2616 section 15.1.3:

Clients SHOULD NOT include a Referer header field in a (non-secure) HTTP request if the referring page was transferred with a secure protocol.

Community
  • 1
  • 1
Greg Hewgill
  • 951,095
  • 183
  • 1,149
  • 1,285
  • Thanks! Just to be sure: that also means since Google.com is now running everything over https, we can't even see anymore if someone came from Google.com (unless checking Google Analytics ofcourse)? And I guess the same goes for Facebook which has always been sending traffic via https? – Adam May 21 '14 at 18:44
  • 1
    Yes, that's correct. You'll find that a lot of sites are moving to https-only, which means you won't get referers in many cases. – Greg Hewgill May 21 '14 at 20:03
  • Check this answer here: http://stackoverflow.com/questions/5052893/email-tracking-gmail apparently if you host your site (or images in email) on https then the referer does get passed on – Matthew Lock Nov 07 '14 at 04:01
  • @MatthewLock Yes, that's what the "(non-secure)" means in the RFC. – Greg Hewgill Nov 07 '14 at 05:17
  • Also, I noticed that IE does not pass URL referrer for any web based email clients using https. http://support.microsoft.com/kb/178066 – Abhishek Shrivastava Dec 30 '14 at 21:30
0

I found that if both the host and the linked to url are over the same protocols it does pass the HTTP_REFERER.

Blake Basas
  • 89
  • 1
  • 5
0

Outlook.com passes http_referer even if the link is non-secure (http). Looks like they just pass "https://outlook.live.com/" as the referer for all requests, which is great. I wish all the major providers would do this.

Clark Baker
  • 91
  • 1
  • 4