AJAX and SEO

Hey all, i’ve got a script which seamlessly integrates AJAX whilst keeping the full functionality of the site. It does this simply by pushing any links it finds through AJAX and only updating the main content area e.g:

mydomain.com/category/article.html

would become

and ajax would just request

mydomain.com/ajax.php?page=category/article.html

It works really well and the site is still full indexable by search engines. However i’m not sure how to make sure i’m getting the juice from backlinks.

I’m guessing that if people link to “mydomain.com/#category/article.html” google would just give the juice to mydomain.com. Even if it does follow the javascript (which apparently Google does now) it would surely find mydomain.com/ajax.php?page=category/article.html and not mydomain.com/category/article.html.

Is there a way around this at all? Canonical urls won’t work since the AJAX won’t be giving the <head> part of the page. I can’t do header redirects as the server can’t get the contents of the has tag.

I’m guessing there may be a way to forward the search engine and thus the link juice via javascript but i’m not sure what it would be.

Any ideas?

Your links that trigger the content update should contain two components:

  1. a normal href to the ‘ajax.php?page=’ URL
  2. a JavaScript event to trigger the AJAX

Users with JavaScript enabled will see the AJAX goodness, those without (incl search engines) will be provided the content without the effect, since the JavaScript command will over-ride the normal link.

Sorry if I didn’t explain myself perfectly, but what you described is basically exactly what I have, but I still don’t know how to make sure i’m getting all the link juice I can get.

I have a href=“mydomain.com/category/article.html

I have a javascript script event on that link which calls “mydomain.com/ajax.php?page=category/article.html” and puts the response into the content area on the site and changes the hash tag to mydomain.com/#category/article.html.

Now if somebody wants to share that link they’re going to just copy and paste the link at the top of the browser which would be “mydomain.com/#category/article.html”. I’m guessing Google will ignore the hash and just give the link juice to mydomain.com meaning “mydomain.com/category/article.html” never gets any link juice.

What i’m asking is if anybody knows of a solution to this problem?

Thanks for the clarification…

I thought I had seen some sites recently that either a) dynamically changed the URL in the browser chrome, or b) allowed parsing/canonicalization of the hashed URL…

Both seem a bit tricky to me - but i’m sure some genius has figured it out.