Generating XML Sitemaps with HREFLANG Tags | Community
Skip to main content
August 3, 2016

Generating XML Sitemaps with HREFLANG Tags

  • August 3, 2016
  • 7 replies
  • 14285 views

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

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

7 replies

smacdonald2008
Level 10
August 4, 2016

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

kautuk_sahni
Community Manager
Community Manager
August 4, 2016

Hi

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:-

Link:-http://www.acronym.com/bebrilliant/seo/hreflang-sitemaps-free-tool/

//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

Kautuk Sahni
January 5, 2017

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

August 11, 2022

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/

AnkurAhlawat-1
Level 6
August 4, 2016

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.

Mat_Barreto
Level 2
January 9, 2017
                 It is and OOTB sitemap feature? Not the ACS one.
Mat_Barreto
Level 2
January 9, 2017
  There is an OOTB sitemap feature? ***
July 10, 2017

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 2
August 5, 2022

Hi @jasonlax ,

 

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

Level 2
September 4, 2023

Was this issue solved? Is there any solution?