Google http vs. https both listed in SERPS

Discussion in 'Google' started by jestep, Nov 4, 2005.

  1. #1
    I just noticed this morning and I have never seen it before on any of my sites.

    When I was checking the ranking manually for a specific term. I found my site at #5, but right below it was the exact same listing of my site, except it is the https: version.

    I tried using a site:https://mysite.com search, but google only displays the non https version of my site in those listings.

    Has anyone had experience with this. I am concerned because this would obviously be seen as duplicate since the pages are identical in content.

    My thought for a solution was something like:
    
    <?PHP 
    if ($_SERVER['SERVER_PORT'] == 80){
    echo "<meta name=\"robots\" content=\"index,follow\" />";
    } else {
    echo "<meta name=\"robots\" content=\"noindex,nofollow\" />";
    }?>
    
    Code (markup):
    Any suggestions, thoughts?
     
    jestep, Nov 4, 2005 IP
  2. TheHoff

    TheHoff Peon

    Messages:
    1,530
    Likes Received:
    130
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I do something like that but instead of no-index,no-follow I give them a 301 and a header location redirect.
     
    TheHoff, Nov 4, 2005 IP
  3. jestep

    jestep Prominent Member

    Messages:
    3,659
    Likes Received:
    215
    Best Answers:
    19
    Trophy Points:
    330
    #3
    I was thinking about that, but I really dont care if the average user is browsing secure. I just don't want the secure pages indexed. Doesn't redirecting from secure to unsecure cause an error message?

    Is there any way to query google to display only secure pages from a site in its index?
     
    jestep, Nov 4, 2005 IP
  4. TheHoff

    TheHoff Peon

    Messages:
    1,530
    Likes Received:
    130
    Best Answers:
    0
    Trophy Points:
    0
    #4
    #1) You may be right. I would test it first. I'm thinking that since you redirect before anything is displayed on the page, it might not throw the error.

    #2) Good question
     
    TheHoff, Nov 4, 2005 IP
  5. rajeev_seo

    rajeev_seo Peon

    Messages:
    211
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    i have no solution that type of questions......
     
    rajeev_seo, Apr 24, 2011 IP