I recently posted here about hosting multiple SSL sites under one IP. I decided eventually to stick with SNI, because most browsers support it, and the ones that don't are outdated and the site probably wouldn't display properly in them anyway.
Well, there was one thing I overlooked: GoogleBot apparently doesn't support SNI, because within a few days of switching to HTTPS, the descriptions and titles of each site matched those of the first one (sorted alphabetically) hosted on the server.
This is a massive problem, but I figured it would be easy to fix: just exclude the Googlebot from the "redirect everything to https" rule. So I added this to the vhost file:
RewriteCond %{HTTP_USER_AGENT} !(.*)(Google)(.*)
Before the
RewriteCond %{HTTPS} off RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
What I expected: Everything BUT the googlebot would be redirected to HTTPS
What I got: NOTHING was redirected to HTTPS, unless my user agent was the literal string '!Google'.
I've tested (here) numerous different combinations for the 'not-google' part, but nothing seems to work.
[link][10 comments]