Help me with a line of code. 5$

Discussion in 'PHP' started by mo0nrider, Oct 2, 2007.

  1. #1
    I will pay 5$ via paypal if you write me the line of code that I need.

    My site is: http://www.linkshare.ro/something-special/

    I need you to write me a line of code that will tell google not to index my paged comments.

    For example this page i don't want it in google.

    The plugin i use is called paged comments and can be found here.

    I've managed to stop robots from indexing the main pages of the site by using this code:
    <?php if ( $paged > 1 ) {
    
    echo '<meta name="robots" content="noindex,follow" /> ';
    
    }?>
    Code (markup):
    Now I just need to get rid of those comments pages.

    Thanks

    Florin
     
    mo0nrider, Oct 2, 2007 IP
  2. sdemidko

    sdemidko Member

    Messages:
    81
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    43
    #2
    possibly you are able to do it in template of your theme - at the comments.php file
     
    sdemidko, Oct 2, 2007 IP
  3. mo0nrider

    mo0nrider Peon

    Messages:
    126
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I'll give you comments.php if is necessary
    Just let me know how to restrict the robots
     
    mo0nrider, Oct 3, 2007 IP
  4. sm9ai

    sm9ai Active Member

    Messages:
    746
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    60
    #4
    I don't think there is an easy way of doing it, but for more difficult ways...

    You could have login to view comments.
    You could have a link - click to view comments - with a nofollow in the link.
    You could put the comments into an iframe and stop google indexing that page.
    You could convert the comments into an image and set the alt text to blank.

    Hope thats of some help.
     
    sm9ai, Oct 3, 2007 IP
  5. meetgs

    meetgs Active Member

    Messages:
    957
    Likes Received:
    35
    Best Answers:
    0
    Trophy Points:
    70
    #5
    I believe this is what you want:
    http://www.google.com/support/webmasters/bin/answer.py?answer=61050

    Edit comments.php and add this in the HEAD section:
    <META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
    HTML:
    or
    <META NAME="GOOGLEBOT" CONTENT="NOINDEX, NOFOLLOW">
    HTML:
    Adding one line of text will solve your problem :)


    EDIT: i just noticed you already have that code. just put that in comments.php
     
    meetgs, Oct 3, 2007 IP
  6. dnahosting

    dnahosting Active Member

    Messages:
    385
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    60
    #6
    what about putting this in your robots.txt file?
    
    User-agent: *
    Disallow: /something-special/comment-page-*
    
    Code (markup):
     
    dnahosting, Oct 3, 2007 IP
  7. mo0nrider

    mo0nrider Peon

    Messages:
    126
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #7
    I don't need this post specially...
    I need this to work with any other post...
     
    mo0nrider, Oct 3, 2007 IP
  8. dnahosting

    dnahosting Active Member

    Messages:
    385
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    60
    #8
    what about this then

    
    User-agent: *
    Disallow: /*/comment-page-*
    
    Code (markup):
     
    dnahosting, Oct 3, 2007 IP
  9. mo0nrider

    mo0nrider Peon

    Messages:
    126
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #9
    Thanks dnahosting for your help :)

    It really works.

    Send my a pm with your paypal account to transfer 5$
     
    mo0nrider, Oct 4, 2007 IP