Problem Links in Google

Discussion in 'WordPress' started by That-Guy, May 18, 2010.

  1. #1
    I am having really strange links appearing in Google but I am not sure where they are coming from.

    If you have a look here:

    Google

    You will see links like this:
    http://www.chrislowthian.co.uk/tag/adobe-device-central-cs5/%3Cli%20class=/
    Code (markup):
    Notice the %3Cli%20class=/ at the end.

    I don't know where the links are coming from. I have checked the xml sitemap and there is nothing wrong there.

    I have also looked through the template with no luck.

    Does anyone have any ideas? I don't want it to start effecting SEO as it is bringing up 404's.
     
    That-Guy, May 18, 2010 IP
  2. DrVillain

    DrVillain Peon

    Messages:
    63
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Did you have another template actice when google crawed your site. Looks to me like an error in a template.
    <li class="
    is whats getting appened to something was building like like <a href="http://google.com<li class="

    leaving off the closing "></a>

    not sure how to fix it other asking google to de index those pages.
    ask the google forum of DP they will probably be more assistance as its not wordpress's fault.
     
    DrVillain, May 18, 2010 IP
  3. rono

    rono Greenhorn

    Messages:
    84
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    16
    #3
    These are badly formed links.
    There are errors in the php code.
    The "%3C" is the "<"character and th %20 is a space. those links are really:
    "http://www.chrislowthian.co.uk/tag/live-messenger/<li class=/"
    It's like the tag <li> is mixed up in the link which should really stop after the "messenger/" like this:
    "http://www.chrislowthian.co.uk/tag/live-messenger/"
     
    rono, May 18, 2010 IP
  4. That-Guy

    That-Guy Peon

    Messages:
    452
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #4
    OK I think I have sorted the problem, I changed this:

    <li><a href="<?php wp_list_pages('title_li=&depth=4&sort_column=menu_order'); ?>"</a></li>
    Code (markup):
    To This:

    <li><?php wp_list_pages('title_li=&depth=4&sort_column=menu_order'); ?></li>
    
    Code (markup):
    Now the next thing for me is to try and get the rubbish links out of google. Is it possible to setup a 301 redirect in the .htaccess so if someone visits:

    http://www.chrislowthian.co.uk/tag/adobe-device-central-cs5/%3Cli%20class=/
    Code (markup):
    They get redirected to:

    http://www.chrislowthian.co.uk/tag/adobe-device-central-cs5/
    Code (markup):
    Any help with that would be great :)
     
    That-Guy, May 18, 2010 IP
  5. DrVillain

    DrVillain Peon

    Messages:
    63
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    quicky and dirty. in the header.php template(or index.php) do an if on the request url looking for "%3Cli%20class=/", if its there redirect to the page without that. redirect with a 301 and google should fix it.

    ;) cheers
     
    DrVillain, May 18, 2010 IP
  6. That-Guy

    That-Guy Peon

    Messages:
    452
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #6
    All fixed now, it was a problem with the theme, I have now fixed this and at the same time made it XHTML valid.

    The rubbish links have also been removed from Google using Webmaster Tools.
     
    That-Guy, May 24, 2010 IP