WordPress.org

Ready to get started?Download WordPress

Forums

SEO NoIndex Comments (8 posts)

  1. Flirtilizer
    Member
    Posted 3 years ago #

    I am using SEO Platinum. It has the ability to turn off indexing of comments. I enabled that option and it seems like I had a good reason but I can't remember what that reason is.

    It would seem to me that I'm doing away with a lot of valuable content when I do that and some not so valuable too. haha

    Anyone willing to share thoughts?

  2. hpguru
    Member
    Posted 3 years ago #

    Yes. You may try Canonical url in html. BTW, there is a code to functions.php.

    function canonical_for_comments() {
     global $cpage, $post;
     if ( $cpage > 1 ) :
      echo "\n";
      echo "<link rel='canonical' href='";
      echo get_permalink( $post->ID );
      echo "' />\n";
     endif;
    }
    add_action( 'wp_head', 'canonical_for_comments' );

    This add link to article "index" page yoursite.com/your-article/, than Googlebot etc. follow it. Sorry my poor English. :)

  3. Flirtilizer
    Member
    Posted 3 years ago #

    Thanks for the try HPguru, I'm going to turn indexing of comments back on. Ii wonder though, will I dilute my content? Anyone?

  4. hpguru
    Member
    Posted 3 years ago #

    This code directs the bot to the article "Home" and other comment pages should not then be indexed.

  5. hpguru
    Member
    Posted 3 years ago #

  6. Flirtilizer
    Member
    Posted 3 years ago #

    Thanks again HP, nice to have someone trying so hard to offer help!!!!

  7. hpguru
    Member
    Posted 3 years ago #

    One more tweak for functions.php

    function seo_for_comments() {
     global $cpage, $post;
     if ( $cpage > 1 ) :
      echo "\n";
      echo "<meta name='robots' content='noindex,follow' />";
      echo "\n";
     endif;
    }
    add_action( 'wp_head', 'seo_for_comments' );

    It add noindex to other comments pages.

  8. sarkem
    Member
    Posted 3 years ago #

    im using plugins SEO Super Comment but i got error in my google webmaster, as a sample http://www.news-gossip.com/archives-667-10-stunning-kate-middleton-style.html
    and the comment template like this http://www.news-gossip.com/archives-667-10-stunning-kate-middleton-style.html?cid=2234

    please help me, may something error in my theme

    thanks before

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags