My Sitemap and jQuery Implementation of Hreflang is Different. Does It Matter?

If you are trying to define the language of a page via hreflang, it’s generally better to use one way of doing so rather than multiple.

A Redditor asked if there were any issues when an XML sitemap includes hreflang markup and the site is also including hreflang markup via jQuery.

Google’s John Mueller replied with,

If you have it in the sitemap, just use that. Adding a second set via jQuery just makes it much harder to diagnose, find, & fix errors.

As the specific question was around multiple implementations that were showing different data then it makes even more sense to pick one over the other. If you can’t be sure which implementation is going to be picked up, I would use the non-javascript version.

Leave a Reply

Your email address will not be published. Required fields are marked *