Welcome to WebmasterWorld Guest from 23.20.230.24

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

https 301 to http for Google

     
3:00 pm on Feb 13, 2007 (gmt 0)

WebmasterWorld Senior Member wheel is a WebmasterWorld Top Contributor of All Time 10+ Year Member



I've got a twist on an old problem. I'm seeing both https and http results showing up in Google's site:domain.com command for a couple of domains.

These domains previously had ssl certs so I was using the https. The certs made no difference, so I dropped them.

What happens now is that (this is the way apache works) an https connection, when not found for that domain, automatically goes to the first https connection on the server. So when Google is indexing [domain1.com,...] it's actually being served [domain2.com....] Domain2.com has an ssl cert that is being actively used.

What's the best way to clean up this mess? Typically a .htaccess on domain1.com would just 301 to the non https version, but in this case domain2.com is actually being served.

5:54 pm on Feb 13, 2007 (gmt 0)

WebmasterWorld Senior Member jdmorgan is a WebmasterWorld Top Contributor of All Time 10+ Year Member



Sounds like you'll need to reinstate the virtual server for HTTPS, and then redirect its requests to HTTP...

Jim

9:20 pm on Feb 13, 2007 (gmt 0)

10+ Year Member



You can't do name based SSl on apache since it has to be bound to an interface... You can have virtual hosts setup on the same server, but only ever have one per interface on SSL. So yes, any requests to the virtual hosts on https will resolve to the same place.

I think in your case you might just want to do a conditional redirect with mod-rewrite to the http version of the site... since 301's should be absolute URLS, in theory there is no problem doing cross domain... don't know if google still has problems with cross-site 301's though - there used to be issues with the original URL being displayed.

pseudocode for mod-rewrite:

IF HTTPS
IF HTTP_DOMAIN
REDIRECT [HTTP_DOMAIN...] [R]

If you don't want to do 301's you could always just serve a 404 for those pages.

 

Featured Threads

Hot Threads This Week

Hot Threads This Month