Can I use X-Default In HREFLang XML Site Map?

Yes, you can use it and it is strongly encouraged if you have a global version of your site.

<?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://www.example.com/myproduct.html</loc>
#This is the example of the global page and the corresponding x-default entry    
     <xhtml:link 
                 rel="alternate"
                 hreflang="x-default"
                 href="http://www.example.com/myproduct.html"
                 />
    
    <xhtml:link 
                 rel="alternate"
                 hreflang="en-gb"
                 href="http://www.example.com/uk/myproduct.html"
                 />
    <xhtml:link 
                 rel="alternate"
                 hreflang="en-us"
                 href="http://www.example.com/us/myproduct.html"
                 />
    <xhtml:link 
                 rel="alternate"
                 hreflang="en-au"
                 href="http://www.example.com/au/myproduct.html"
                 />
  </url>
  
  <url>
    <loc>http://www.example.com/uk/myproduct.html</loc>
     <xhtml:link 
                 rel="alternate"
                 hreflang="x-default"
                 href="http://www.example.com/myproduct.html"
                 />
    
    <xhtml:link 
                 rel="alternate"
                 hreflang="en-gb"
                 href="http://www.example.com/uk/myproduct.html"
                 />
    <xhtml:link 
                 rel="alternate"
                 hreflang="en-us"
                 href="http://www.example.com/us/myproduct.html"
                 />
    <xhtml:link 
                 rel="alternate"
                 hreflang="en-au"
                 href="http://www.example.com/au/myproduct.html"
                 />
  </url>
  
  <url>
    <loc>http://www.example.com/us/myproduct.html</loc>
     <xhtml:link 
                 rel="alternate"
                 hreflang="x-default"
                 href="http://www.example.com/myproduct.html"
                 />
    
    <xhtml:link 
                 rel="alternate"
                 hreflang="en-gb"
                 href="http://www.example.com/uk/myproduct.html"
                 />
    <xhtml:link 
                 rel="alternate"
                 hreflang="en-us"
                 href="http://www.example.com/us/myproduct.html"
                 />
    <xhtml:link 
                 rel="alternate"
                 hreflang="en-au"
                 href="http://www.example.com/au/myproduct.html"
                 />
  </url>
  
    <url>
    <loc>http://www.example.com/au/myproduct.html</loc>
     <xhtml:link 
                 rel="alternate"
                 hreflang="x-default"
                 href="http://www.example.com/myproduct.html"
                 />
    
    <xhtml:link 
                 rel="alternate"
                 hreflang="en-gb"
                 href="http://www.example.com/uk/myproduct.html"
                 />
    <xhtml:link 
                 rel="alternate"
                 hreflang="en-us"
                 href="http://www.example.com/us/myproduct.html"
                 />
    <xhtml:link 
                 rel="alternate"
                 hreflang="en-au"
                 href="http://www.example.com/au/myproduct.html"
                 />
  </url>
  
</urlset>


Speak Your Mind

*