Comment on Duplicate Content and Canonical URLs by SEO Dave.
The problem with your code fix is it removes the value of having a lot of comments, with your fix there is no SEO value in having a popular post with dozens of comments, in fact it’s an SEO negative having paginated comment pages that add no SEO value. The alternative is to have all your comments on one page, which is just as bad (worse) as that has SEO performance ramifications! Or limit the number of comments per post.
It’s interesting that websites like the developer of the Yoast WordPress SEO Plugin doesn’t allow paginated comments pages and has to disable comments after the post ages to limit the number of comments and he has his SEO plugin add a canonical URL similar to what you’ve coded.
You and the Yoast developer see a lot of comments as an SEO problem, I see them as an SEO opportunity. My comments are indexed in their own right, when this comment is indexed by Google I might gain a SERP like “SEO Value of WordPress Paginated Comments” since my comments have unique title tags.
Rather than benefit from so much user generated content this canonical URL technique throws the SEO opportunity away!
Let’s say you have 100 comments on a post broken over 5 paginated comment pages (I have a lot of content like this).
This gives you the potential for 5 uniquely SEO’d webpages with unique title tags and mostly unique content (comments are unique content).
For your average WordPress user they won’t have the skills to code unique title tags for all 5 paginated pages or even set the paginated pages to show an excerpt of the main post. These features are built into the WordPress SEO Package I’ve developed.
Note the above clickable link doesn’t have a nofollow tag which deletes link benefit: SEO feature, can turn nofollow on/off.
Stallion Responsive can set the first 6 paginated comment pages to use a unique title tag (for more than 6 the titles are reused: paginated page 8 uses the same title as page 2) and sets paginated pages to use an excerpt of the main post which means unique title tags (and unique H1 header and unique link back to main article as well) and most of the content is from the comments not a duplicate of the main post.
See this in action on any of the popular posts (see popular posts widget on left sidebar).
For the record I’ve also added the option to add a single canonical URL to the main post from all paginated comment pages (similar to your code and the Yoast SEO plugin).
To answer your question, in theory the SEO rankings of content on the paginated webpages should be transferred to the main articles SERPs. When I used to use the technique you are using it did pass SEO benefit, but not used it in sometime so I don’t know for sure now.
Easiest way to check is go to one of your paginated comment pages, search for some unique text on one of the comments surrounded by speech marks “unique comment text here”. If Google passes SEO benefit to the main article via the canonical URL the main article should be found for the unique search phrase. Like I said it used to, but I no longer have any sites using the technique so would have to find another website using the technique to test.
I was concerned if all the content was added as if it was one webpage, so 100 comments spread over 5 paginated comments being treated as one webpage with 100 comments worth of text and links etc…
There’s the risk of damaging the optimization of the main content, there will be less main content than comment text which unless you rewrite all user comments (I don’t) won’t be as well optimized as what we can write. My comments are filled with off topic text.
With your average WordPress setup (not Stallion Responsive users) there’s the SEO argument you should have no comments on important webpages, this focusses your optimization (you have 100% control over optimization of text etc…). When a user comments on your site (literally your site, not the same with my site) if they add an author URL it will probably be nofollow which deletes link benefit, if they add a link like this in the body of the comment https://stallion-theme.co.uk/stallion-responsive-theme/ it will be converted to a clickable link with a nofollow tag (deleting link benefit), the comment permalinks will have awful anchor text.
Unless the theme has been modified to remove these issues all this damages a webpages SEO (multiply it by 100 comments), I’ve fixed all these SEO issues with Stallion Responsive AND added SEO benefits to some of them like my comment permalinks use optimized anchor text (the alternative is remove them, but then visitors lack a way to link directly to comments), author URLs can be disabled or served as a post form (looks like a link, but Google doesn’t treat forms as links).