Expand my Community achievements bar.

Generating XML Sitemaps with HREFLANG Tags


Level 1

Is there a solution for automatically generating XML sitemaps containing hreflang tags or available thru a partner/3rd party service?

9 Replies


Level 10

Can you explain your use case in more detail please. Not sure what you want to accomplish.




I do not know if AEM have OOTB for this.

But if you need to add manually , then

    HrefLang tag that goes within the <head> section of the page source code.

    Few examples of how the hreflang tag would be implemented on the site/page:
        <link rel=”alternate” hreflang=”en-gb” href=”http://www.mysite.co.uk”/> //(for .co.uk sites)

        <link rel=”alternate” hreflang=”en-us” href=”http://us.mysite.com”>    // (Google US)

        <link rel=”alternate” hreflang=”en-au” href=”http://www.mysite.com/au/”>   //Google Australia:

For Free tools, please have a look at this article:-


//he use of rel=”alternate” hreflang=”x” within XML Sitemaps w/ FREE TOOL

Link:- http://www.stateofdigital.com/hreflang-sitemap-tool/

//Hreflang Sitemap Tool for Multilanguage & Multinational Websites

I hope this would be of some help to you.

Thanks and Regards

Kautuk Sahni


Level 1

This is a good manual solution I think he is looking for a more scalable solution. There is a need to reference other pages that are equivelent, but in a different language/geo. I, too, am looking for a dynamically created hreflang tag on page and in an XML file


Level 1

SEO requirements for Hreflang make this an important use case, and I hope Adobe Experience team looks at this.
To augment what Jeff wrote, HTML hreflang is a challenge to do sitewide (not to mention it's additional html on a page)
This is a quick guide about how to build an XML sitemap with hreflang tags, but this is not specific to a CMS, and AEM doesn't appear to have documentation on this:  https://ahrefs.com/blog/hreflang-tags/


Level 7

I didn't got your question correctly?

Do you want to generate seperate sitemap.xml based on locale that hreflang detects?

Or just to all all locale url to sitemap.xml?

By default sitemap that is generated by aem consist of all the pages that are activated. If you want to customize it then you need to override OOTB sitemap component and get the hreflang from the locale browser and then generate sitemap.


Level 3
                 It is and OOTB sitemap feature? Not the ACS one.


Level 3
  There is an OOTB sitemap feature? ***


Not applicable

Possibly worth noting that A1 Sitemap Generator can crawl multi-language websites. When building the XML sitemap, it will try to determine which pages are language variations and automatically include hreflang information in the XML sitemap file as well.


Level 1

Hi @jason_lax ,


Did you found any solution for the issue you were facing to automatic generate hreflang tags through the XML sitemap?

page footer