How to make ajax pages seo friendly?
Ajax or SEO? Many webdevelopers face a very difficult choice i.e to Ajax or not. Noone doubts the superiority of ajax pages when it comes to user experience. However while google keeps on saying that build websites with users in mind, it absolutely sucks at ranking ajax pages.
Ajax Sites suck at SEO for a very simple reason. It is Googlebot’s inability to read and interprete javascript properly. If you have any doubt about how badly googlebot sucks with javascript, you should read this post by..well..google itself.
The problem with AJAX then boils down to 2 important ones i.e internal navigation and on-page content.
On Page content issue with ajax
If you are rendering all the content using ajax only then google bot will find a blank page. (googlebot ignores javascript for all practical purposes) On the other extreme if you load up all the content in the html code as hidden content then you shall get into even more trouble as all that content will look like spam.
Solution to On Page content issue with ajax
Build separate content blocks as standalone pages. Like say you want to show hotels if mumbai or kolkata, depending on what the user selects on left navigation. Create the data as mumbai.php and kolkata.php. It will make it easier for you to serve the data. The individual pages should be crawlable on their own. We shall discuss how to make sure that googlebot crawls these pages next.
Making ajax links crawlable. So you have created mumbai.php and kolkata.php. But the link to these pages is present in javascript and hence googlebot never bothers to crawl them. What to do? Use Hijax
Code for the link will look like href=”ajax.htm?foo=32” onClick=”navigate('ajax.html#foo=32'); return false”>foo 32. This combines a html link for the spider and ajax link for user. Brilliant
For details about how to make ajax more seo friendly read this awesome presentation.
Popularity: 6% [?]
