Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I note that www.google.com is increasingly being used through https, and this results in no HTTP Referer being provided to my web-sites for hits that originate from Google Search over SSL.

How do I run my web-sites such that if they are to appear as a Search Result for a given search at Google, then an https version is provided, but only if the Google Search itself is accessed through https?

share|improve this question
    
Why was this question downvoted? –  cnst Jun 11 '13 at 2:59
    
Not sure, but the question and body is very confusing and unclear –  Baumr Jun 11 '13 at 14:51
add comment

1 Answer 1

Running an HTTPS server may allow the full referer header through in some cases in some browsers but it will NOT allow it through in all cases. I have done some testing myself. See: "Not Provided" keywords from Google search: If your site uses https, does Google always send the keywords in the referrer?

Google does not provide a mechanism for you to rank you HTTPS sites for HTTPS search and your HTTP site for HTTP search. At best, you would could redirect between the two based on the referer. You do get a referer of https://www.google.com/ (without keywords) when somebody searches from Google on Google's HTTPS site. You could redirect this request to your HTTPS site because it is has an external referer starting with https://.

share|improve this answer
    
I don't think your information is correct: if your site is http, you won't be getting any https referrers; I'm not sure I even understand the rationale of your answer: if you already got a hit, and already have a referer of google.com, what's the point of going https? My whole point of going https is because many hits don't have ANY referrers whatsoever, without or without the search keyword. –  cnst Jun 11 '13 at 3:00
2  
The last time I tested https site referers to a http site I saw they got truncated to just the domain name. I didn't see the "empty referer" phenomenon that you describe. Browsers may have changed since last time I looked into it. –  Stephen Ostermiller Jun 11 '13 at 12:38
    
It may depend of the browser, then, my SeaMonkey doesn't provide any referers. I still don't understand why would you redirect from http to https, did you tests reveal that it somehow results in the complete referer being passed? Which browser did you test with? –  cnst Jun 11 '13 at 16:16
    
I did some referrer testing with Firefox several years ago. I just repeated the tests using Firefox and LiveHttpHeaders. It appears that firefox now does not send any referrer, like seamonkey for you. –  Stephen Ostermiller Jun 11 '13 at 16:31
    
Based on my access log, I see that Chrome/27 (last version of Chrome?) must be doing the truncation thing very frequently; not sure whether Firefox had been doing this in the past or not. I'm still unclear whether a redirect from http to https would bring you the full referer, I think it'll instead show your own http page as being a referer. –  cnst Jun 11 '13 at 16:39
add comment

Your Answer

 
discard

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.