Developer forum

Forum » CMS - Standard features » Multilingual sitemap.xml

Multilingual sitemap.xml

António Ramos
Reply

Hello,

We have a client that want to set all the links (multi-language) in one unique sitemap.xml. 

Is it possible to do it like the below example? 

<url>
    <loc>http://www.example.com/english/</loc>
    <xhtml:link 
                 rel="alternate"
                 hreflang="de"
                 href="http://www.example.com/deutsch/"
                 />
    <xhtml:link 
                 rel="alternate"
                 hreflang="de-ch"
                 href="http://www.example.com/schweiz-deutsch/"
                 />
    <xhtml:link 
                 rel="alternate"
                 hreflang="en"
                 href="http://www.example.com/english/"
                 />
  </url>

 

More info: https://support.google.com/webmasters/answer/2620865?hl=en

Best regards,

António Ramos


Replies

 
Nicolai Høeg Pedersen
Reply

It depends on your domain and website structure.

If you have 3 websites sharing the same domain, all the urls from the 3 websites will be in the sitemap.xml

If the 3 websites have 3 different domains, there will be three sitemap.xmls of course.

 
António Ramos
Reply

Hi Nicolai,

Thanks for your quick answer. We set the main website (PT) and his 4 languages (DE,FR,EN,ES) with the same primary domain, but the sitemap only returns the pages from the first language (DE), neither the main website pages (PT) were listed.

We are at version 8.3.1.9, but we just tried at 8.5.0.1 and this issue maintains... 

Another thing, I tried to access at solution set, but it gave me a 404 error.

Best regards,

António Ramos

 
Morten Bengtson
Reply

I assume that your client needs this for some SEO purpose and not for some other tool that requires this exact file format.

Search engines are pretty clever these days, but you can inform them about the relations between pages on multilingual sites in different ways.

You can accomplish the same thing by adding a few extra lines of html in your master layout template instead of generating a single sitemap (which search engines might ignore if it's too large or too slow).

If you have multiple websites set up as actual language versions, then you can render links to alternate language versions of the same page - https://support.google.com/webmasters/answer/189077?hl=en 

This is done by using the Languages template loop...

<head>

...

<!--@LoopStart(Languages)-->
<!--@If Defined(PageID)-->
<link rel="alternate" href="/Default.aspx?ID=<!--@PageID-->" hreflang="<!--@Culture-->" />
<!--@EndIf(PageID)-->
<!--@LoopEnd(Languages)-->

</head>

 

 
Nicolai Høeg Pedersen
Reply
This post has been marked as an answer

Hi Antonio

I see your issue.

Will look into it and see if it is a candidate for a bug fix or the addition of a new feature.

Nicolai

Votes for this answer: 1
 
António Ramos
Reply

Morten,

Thanks for your answer. Besides that was not what we actually look, it's one of the correct ways to index multi-lingual webpages.

 

Nicolai,

Thank for your feedback, we will be waiting for your news. The correct implementation of sitemap.xml it’s important for us as to all Dynamicweb clients.

 

Best regards,

António Ramos

 
António Ramos
Reply

Hi Nicolai,

Do you have any feedback regarding this issue?

Best regards,

António Ramos

 
António Ramos
Reply

Answered here:

http://developer.dynamicweb.com/Default.aspx?ID=2&PID=48&CategoryID=38&ThreadID=38756

" (..) you cannot currently get a sitemap spanning multiple websites. Implementation of this is scheduled for Dynamicweb 8.6.1. (..) "

 

 

You must be logged in to post in the forum