Strange indexing issue - Please help

Discussion in 'Search Engine Optimization' started by yonatan28, Sep 27, 2010.

  1. #1
    Hi,

    I am a vendor in clickbank and when an affiliate sends a visitor the visitor lands on a page like this: http://mysite.com/?hop=affid

    Now, my index page has been dropped from the index and Google has indexed
    http://mysite.com/?hop=affid instead of my home page.

    Naturally, this doesn't rank for anything since it's my home page that has all the links pointing to it.

    Does anyone know how I can do a 301 redirect from http://mysite.com/?hop=affid
    to http://mysite.com ?

    I just can't seem to be able to do it and it's killed my ranking.

    Thanks.
     
    yonatan28, Sep 27, 2010 IP
  2. social-media

    social-media Member

    Messages:
    311
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    35
    #2
    If you're hosted on Linux/Apache then you can use Mod_Rewrite/.htaccess files to implement the 301 redirect by adding rewrite rules to the .htaccess in your web site's root folder as follows:

    If you prefer www as your canonical URL:

    RewriteCond %{QUERY_STRING} hop= [NC]
    RewriteRule (.*) http://www.mysite.com/ [R=301,L]

    If you prefer non-www as your canonical URL:

    RewriteCond %{QUERY_STRING} hop= [NC]
    RewriteRule (.*) http://mysite.com/ [R=301,L]
     
    social-media, Sep 27, 2010 IP
  3. yonatan28

    yonatan28 Peon

    Messages:
    89
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Hi,

    Thanks for trying to help but for some reason this doesn't work. When I go to http://mysite.com/?hop=affid
    after updating my .htaccess with that code, the page doesn't load. It's as if there's some endless loop there.

    Perhaps that code needs tweaking?
     
    yonatan28, Sep 28, 2010 IP