There are many pages on the website with a component that allows users to post comments. To reduce page load time, and since several users use the comment system, the comment component is loaded via AJAX after the page loads. Problem: how can we get Google to index dynamic content loaded via AJAX when the page loads?
Many other AJAX and SEO pages suggest allowing Google to index content as a separate page. This is an invalid solution here - we do not want the comments for the item to be a unique page.
The solution we are considering:
Create two versions of the page (one static, one dynamic):
- www.example.com/page/comments_on (upload comments statically)
- www.example.com/page (loading comments after loading the page via AJAX)
Then set the canonical URL www.example.com/page/comments_on to www.example.com/page. We placed both URLs in the sitemap.xml file.
Will this work? What are the disadvantages of this approach? What other approaches to this situation exist?
source share