[wp-trac] [WordPress Trac] #8919: previous_comments_link and
next_comments_link needs nofollow to avoid duplicate content
WordPress Trac
wp-trac at lists.automattic.com
Thu Jan 22 09:22:33 GMT 2009
#8919: previous_comments_link and next_comments_link needs nofollow to avoid
duplicate content
-------------------------+--------------------------------------------------
Reporter: DarkPepe | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: 2.8
Component: Comments | Version: 2.7
Severity: major | Keywords: comments, nofollow,
-------------------------+--------------------------------------------------
Hi, lots of users are reporting (including me) about a duplicated content
problem generated on the paged comments feature.
Since each page reproduces the post content but displays the next/previous
comments, google is picking the new permalink as a duplicated content
page. Example:
www.site.com/post-name/
www.site.com/post-name/comment-page-2/
In those permalinks, google catches the content as duplicated regardless
the extension and actual content of the comments.
http://www.wihe.net/wp-content/uploads/2009/01/google-webmaster.gif
(spanish)
Both duplicated content and duplicated title tags are beeing detected by
google's webmasters tools.
The solution I found are implementing nofollow via a denial string on
robots.txt or evenadding a meta string for nofollow based on cpage
function.
Probably the best solution will be to add a nofollow property directly on
the comments_link function
wp-includes/link-template.php
@line 1277 (Public 2.7 Branch)
{{{
echo '<a href="' . clean_url( get_comments_pagenum_link(
$nextpage, $max_page ) );
}}}
Replace with:
{{{
echo '<a rel="nofollow" href="' . clean_url(
get_comments_pagenum_link( $nextpage, $max_page ) );
}}}
Then @line 1307:
{{{
echo '<a href="' .
clean_url(get_comments_pagenum_link($prevpage));
}}}
replace with:
{{{
echo '<a rel="nofollow" href="' .
clean_url(get_comments_pagenum_link($prevpage));
}}}
Well, probably you guys are way better programers than me and can come
with a better solution for this.
Thank you!
--
Ticket URL: <http://trac.wordpress.org/ticket/8919>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list