You heard the term, you asked your front-end web developer to implement it on your site, and then you bragged to your peers at cocktail parties about it: AJAX. While the upside is in many cases, a more pleasant UX, there could be a negative impact on your SEO.

There are many different scenarios where one might implement AJAX, but one to watch out for is when you are delivering content that is pertinent to your page. Imagine this scenario:

  • You have a page that offers a brief yet useful description about each of the 50 US states
  • Instead of making users wait for a full page refresh, you have your front-end developer implement AJAX so that when the user selects a state, the brief description is fetched from the server and displayed. No page refresh, just a quick GET that returns the information.

The good news is: Your user has a better experience than one that would have to wait for 50 page refreshes if they wanted to know about every state.

The bad news is: Your content is not being indexed but any search engines.

If you are scratching your head, think about the scenario we described above. Each time the user selects a state, the data is fetched from the server via AJAX. This means that the requested content is not part of the page. Search bots do not understand or interact with AJAX, they simply scrape the page and index the content that is contained in the markup at their discretion.  This means that when a search bot arrives at your page, it never sees the 50 descriptions about the various states.  So, while you have created a richer UX, you are doing so at the price of your SEO, which has in theory, diminished.

Summary:

This is not the end of the world. It is simply a good dynamic to be aware of. There is a way to work around this. Inside of a set of <NOSCRIPT> tags, you could have the content that includes the brief descriptions on all 50 states. This way the search bots will see the content when indexing your page. Also, visitors who use screen readers will have access to that content as well. It’s a “best of both worlds” approach that allows you to continue creating a richer browsing experience for your visitors who have JavaScript enabled, but also cater to those who do not have JavaScript enabled, or use a screen reader, and also keep your SEO… well… “Optimized” !

Kevin Chisholm