Search Engine Optimization in XML+XSLT designs

It's amazing that the question “how do I perform SEO for a web site that does XSLT transformation on the browser” still pops up, as the short answer is very obviously “You can't.”The long answer is, as always, a bit more complex:
  • Google can process XML data, but only stores it into supplementary index (lower rankings)
  • If the server's XML output does not contain enough context (for example, product description in HTML-ish format), the search engines cannot make any sense out of it, so it would not be indexed appropriately.
  • Search engines will not follow explicit (let alone implicit) links in XML documents, so you need a sitemap (classic HTML page, Atom/RSS feed or Google sitemap) to help search engines find the content pages
Until Google (and other search engines) implement XSLT transformations, the only sensible approach is to detect the client capabilities on the server and perform the XSLT transformation on the server if the client cannot do it (the whole architecture is described in my InformIT article Optimized Presentation of XML Content that was published almost exactly a year ago).

2 comments:

ashoon said...

Coming from a web design background, I have had reservations about the concept of browser-side processing. Coupled with the SEO issues you've mentioned, I have opted for server processing (using PHP5's SimplyXML). My feeling is that I have enough problems dealing with behavior of browsers' CSS rendering, I don't want to deal with browser-specific issues with my xslt processing as well.
Are there considerable browser-specific differences in xsl transformation, or am I being overly cautious?

Ivan Pepelnjak said...

I've been using browser-side XSLT processing for over a year and never had any problems with IE and Firefox, they behave almost identically as long as your XSLT is valid. Firefox is a bit more relaxed in error handling, so if you have an invalid stylesheet, Firefox might ignore the error but it would fail to work on IE.

Opera is a different story (and I have simply decided not to offer XML data to Opera visitors) and Safari is not widespread enough in my customer base to notice.

Post a Comment