Sitemaps to cross reference same pages where exist

Ashish Narnoli asked on May 15, 2014 03:35

Hi All,

I have setup Multilingual website and using GoogleSitemap.xml which is working fine.

Currently the Sitemap looks like :

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml">
<url>
    <loc>http://gb.XYZ.com/Products</loc>
    <priority>0.8</priority>
    <lastmod>2014-04-01</lastmod>
    <changefreq>monthly</changefreq>
</url>
</urlset>

What i need, if the same page is available in other culture then the Sitemap should be in below format

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml">
<url>
    <loc>http://gb.XYZ.com/Products</loc>
    <priority>0.8</priority>
    <lastmod>2014-04-01</lastmod>
    <changefreq>monthly</changefreq>
     <xhtml:link rel="alternate" hreflang="en-gb" href="http://gb.XYZ.com/Products">
     <xhtml:link rel="alternate" hreflang="de" href="http://de.XYZ.com/Produkte">
</url>
<url>
    <---- OTHER URL ---->
</url>
</urlset>

Suggestions are highly appreciated!!

Best Regards!

Ashish Narnoli

Recent Answers


Brenden Kehren answered on May 18, 2014 21:55

I'd suggest setting up a separate page with the XML Sitemap webpart on it. This way you can customize the output a bit more with a transformation. Then in your Settings make the URL change to point to the new sitemap page and when Google accesses the googlesitemap.xml page it will render the new custom page you setup.

Here's some documentation for it.

2 votesVote for this answer Mark as a Correct answer

Ashish Narnoli answered on May 19, 2014 00:21

Hi Brenden,

Thank you so much for your reply.

I followed the same approach as you have suggested and it is working as desired. :)

Best Regards! Ashish Narnoli

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.