Forum Moderators: Robert Charlton & goodroi

Message Too Old, No Replies

Google showing https for home page instead of http

How to get rid of https page?

         

dupac

1:10 pm on Mar 27, 2007 (gmt 0)

10+ Year Member



Last week google started showing our website listing as https:// instead of http. Also our site description is a line which we dont have any were on the page or meta tags.
What can we do to fix it?
thanks

jdMorgan

1:14 pm on Mar 28, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



301 redirect the search engine spider requests for the https home page to the http home page.

In all cases where pages are accessible with multiple URLs, 301 redirect to the "canonical" --or preferred-- URL. It is up to you to make sure that each page has only one URL by which it is accessible. For example, a recipe for trouble is a home page accessible at

example.com/
www.example.com/
example.com/index.php
www.example.com/index.php

This could potentially divide your PageRank and link popularity by four if people link to all of them.

How you do this 301 redirect depends on what server you're on -- Use ISAPI Rewrite for IIS or mod_rewrite for Apache.

A search of WebmasterWorld for "canonical domain" and "canonical URL" will turn up lots more info.

For a description, Google uses a "snippet" of text selected from the page that best matches the user's typed-in search terms. So you have two choices: Either make your description better fit your top search terms, or use the "nosnippet" attribute value in the on-page <meta name="robots"> tag. The first approach, if at all possible, is better.

Jim

tedster

1:56 pm on Mar 28, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Here's what Google has to say:

Each port must have its own robots.txt file. In particular, if you serve
content via both http and https, you'll need a separate robots.txt file for each
of these protocols. For example, to allow Googlebot to index all http pages
but no https pages, you'd use the robots.txt files below.

For your http protocol (http://yourserver.com/robots.txt):

User-agent: *
Allow: /

For the https protocol (https://yourserver.com/robots.txt):

User-agent: *
Disallow: /

[url=http://www.google.com/support/webmasters/bin/answer.py?answer=35302&query=https&topic=&type=]Webmaster Help Center

I feel the best practice is to set port 443 service on a dedicated subdomain, such as secure.example.com

That gives you two seperate domain roots with dedicated robots.txt files for each one. This avoids all kinds of potential chaos.

Bewenched

6:25 pm on Mar 28, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



What ever you do fix it QUICK. That happened to us last year and we got slammed hard core for duplicate content.

dupac

1:19 am on Mar 30, 2007 (gmt 0)

10+ Year Member



Thanks a lot guys for your sussestions.
D

pageoneresults

1:32 am on Mar 30, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



For those of you using ISAPI_Rewrite, here's the code...

RewriteCond %HTTPS ^on$
RewriteRule /robots.txt /robots.https.txt [I,O,L]

How do you put a robots.txt file at the https level on a Windows server?

tedster

3:12 am on Mar 30, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Here's a good thread from our Apache forum:

[webmasterworld.com...]

Also, for those on Windows servers but not using ISAPI Rewrite, you can do a page-specific workaround:

<%
'PUT THIS AT TOP OF PAGE
Response.Buffer = True
%>

<%
'FORCE PAGE TO BE NON SSL
Dim Domain_Name, theURL, QUERY_STRING, HTTP_PATH
Domain_Name = lcase(request.ServerVariables("HTTP_HOST"))

IF Request.ServerVariables("SERVER_PORT")<>80 THEN

HTTP_PATH = request.ServerVariables("PATH_INFO")
If Left(HTTP_PATH, 8) = "/Default" Then
HTTP_PATH = ""
End If
QUERY_STRING = request.ServerVariables("QUERY_STRING")
theURL = "http://www.YOURDOMAIN.com" & HTTP_PATH
if len(QUERY_STRING) > 0 Then
theURL = theURL & "?" & QUERY_STRING
end if
Response.Clear
Response.Status = "301 Moved Permanently"
Response.AddHeader "Location", theURL
Response.Flush
Response.End
end if
%>