Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I have a blog on this page:

domain.com/Blog/5/some-title

Below the blog entry it says, "click for comments".

You click the link, and it goes to:

domain.com/Blog/5/some-title/Comments

For user experience, the blog content is displayed, with the comments displayed below it. It goes on multiple pages, such as:

domain.com/Blog/5/some-title/Comments/Page1
domain.com/Blog/5/some-title/Comments/Page2

I want all the comments to be indexed by engines, but, each page displays the blog content on it!

I don't want to canonical it to the blog URL, because the comments wont be indexed. I don't want to not display the blog, because it takes peoples comments out of context and isn't so user friendly.

Any way around this? Assume there are thousands of comments.

share|improve this question
add comment

3 Answers

up vote 4 down vote accepted

Search engine spiders typically do not deal in cookies or Javascript.

If you are generating the comments page with a script on every request (not likely if you're getting thousands of comments) you can display the blog entry content when the visitor has a cookie of some variety set.

If you are serving up a static HTML page from a cache, add a Javascript call which loads the blog entry content with an AJAX request.

share|improve this answer
    
That's a great solution thanks –  Tom Gullen Apr 15 '11 at 14:04
add comment

Load the whole page, including comments - this is your canonical URL. Then handle pagination of the comments by JavaScript.

If you specifically want them to be on a different URL like you put above, then use JavaScript to remove them from the blog page and replace them with the links as above. Then use your robots file to ignore */Comments/*.

share|improve this answer
    
This doesn't work well if you have 20,000 comments! –  Tom Gullen Apr 15 '11 at 8:08
add comment

Any way around this? Assume there are thousands of comments.

Should we assume that there are thousands of comments on your blog in total, or thousands of comments per blog entry?

If you're talking about blog entries that get a few dozen or even 100+ comments, please just keep everything at one URL - blog entry and all comments, no clicking a link to get to the comments on another URL, no weird javascripts.

When you start getting above 1-200 comments per post, that's when you need to look at more exotic solutions.

Are you using a blogging tool / CMS? If so, which one?

share|improve this answer
add comment

protected by Community Aug 18 '11 at 13:21

Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.