SEO Friendly AJAX
AJAX isn’t typically thought of as being very search engine friendly. This is because search engines don’t process any JavaScript, which AJAX is built upon. I’m using a ton of AJAX on this one search engine site. In fact, the search engine itself is done in AJAX since it makes for quick page loads and overall a great user experience. This is a big problem because we also, of course, want all the pages that our search engine indexes to be spidered by Google and the other search engines. Besides the AJAX search, the only other way users reach the bottom level pages is through an advanced search form, which of course Google can’t spider.The solution is to make a hard link search engine that parallels the AJAX one. Since the search begins with selecting a state, I put a list of hard links to each of the states right underneath the map on the main page. The page that these links leads to uses a PHP include to swipe the PHP page that the AJAX search routed to. This page used $_GET variables normally with the AJAX so it was easy to interface with it in this respect. The only thing I had to do was put a switch to take out any of the AJAX JavaScript links from the returned page, and replace it with new hard links.There was one SEO problem to note. Since search engines stop caching pages with more than two $_GET variables, it was important to make the paginator only rely on the state and the page number. All the other links to sort the results were nofollowed. Also the paginator included hard links to each results page and the next/previous links were nofollowed. The idea behind this is to reduce the number of steps from the homepage each link was.All in all it was a rousing success. Googlebot went nuts when it saw the 3,000 some odd user’s pages. It indexed half of them the day after I launched the new hard-link search engine. Sure the AJAX still isn’t SEO friendly, but this is a pretty good workaround, that is also pretty robust, since it uses the same page as the AJAX calls, there won’t be any double-revisioning.
Posted on Monday, December 10th, 2007 at 10:10 pm in SEO, webdev.
Tags: AJAX, PHP, SEORSS 2.0 | Trackback |






