Browsers will not send a referrer when linking from HTTPS to HTTP

Updated . Posted . Visible to the public.
  • When your site is on HTTPS and you are linking or redirecting to a HTTP site, the browser will not send a referrer.
  • This means the target site will see your traffic as "direct traffic", i.e. they cannot distinguish such hits from a user who directly typed in the URL.

Reasons for this behavior

It's probably because of this RFC Show archive.org snapshot :

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

It's not clear why this SHOULD exists. One might think it's because of session IDs encoded in the URL (something that was in fashion in the 90s), but then again browsers do send referers when linking from HTTPS to HTTPS.

Fixes

Henning Koch
Last edit
Keywords
ssl, referer
License
Source code in this card is licensed under the MIT License.
Posted by Henning Koch to makandra dev (2013-05-06 15:00)