I am getting Sitemap XML using mydomain/sitemap.xml but because of a tag, it is not correctly getting rendered in all browsers. Is there a way to configure/remove the following particular tag from sitemap.xml

Need to remove this:

xhtml:link rel="alternate" hreflang="en" href="https://mydomain.com/en

enter image description here

  • Likely not worth the effort to change this. The goal is to have a file compatible with search engines. Commented Jun 20, 2019 at 14:39

1 Answer 1


Yes, you can. But it's not configurable.

You need to override SitemapGenerator located in Sitecore.XA.Feature.SiteMetadata library. Most of the things are marked there as protected virtual so you shouldn't have problems with achieving what you want in your implementation.

At the end just replace SXA implementation with your one in the DI container. This class is registered in the Sitecore.XA.Feature.SiteMetadata.config configuration file (section <services>) but you can replace it in the code as well.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.