Is there a solution for automatically generating XML sitemaps containing hreflang tags or available thru a partner/3rd party service?
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
//Hreflang Sitemap Tool for Multilanguage & Multinational Websites
I hope this would be of some help to you.
Thanks and Regards
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
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/
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.
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.