Mobile app version of vmapp.org
Login or Join
Tiffany637

: Href lang annotations in xml sitemap file displays issues Following Google guidelines for creating an sitemap.xml file to add a href lang annotations, I'm getting display issue when viewing the

@Tiffany637

Posted in: #Google #Hreflang #Xml #XmlSitemap

Following Google guidelines for creating an sitemap.xml file to add a href lang annotations, I'm getting display issue when viewing the sitemap.xml file in my browser.

Instead of looking like a normal xml sitemap, it just displays like text on a single line:



I think this is just a display issue, if you view source it looks fine and all data is there, it also tests in GWT with no errors, but what is causing it to displays like that?

Here is an example of the code:

<?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/en/</loc>
<xhtml:link rel="alternate" hreflang="en-sg" href="http://www.example.com/en/" />
<xhtml:link rel="alternate" hreflang="en-ph" href="http://www.example.com/ph/" />
<xhtml:link rel="alternate" hreflang="en-my" href="http://www.example.com/my/" />
</url>
<url>
<loc>http://www.example.com/ph/</loc>
<xhtml:link rel="alternate" hreflang="en-sg" href="http://www.example.com/en/" />
<xhtml:link rel="alternate" hreflang="en-ph" href="http://www.example.com/ph/" />
<xhtml:link rel="alternate" hreflang="en-my" href="http://www.example.com/my/" />
</url>
<url>
<loc>http://www.example.com/my/</loc>
<xhtml:link rel="alternate" hreflang="en-sg" href="http://www.example.com/en/" />
<xhtml:link rel="alternate" hreflang="en-ph" href="http://www.example.com/ph/" />
<xhtml:link rel="alternate" hreflang="en-my" href="http://www.example.com/my/" />
</url>
</urlset>

10% popularity Vote Up Vote Down


Login to follow query

More posts by @Tiffany637

0 Comments

Sorted by latest first Latest Oldest Best

Back to top | Use Dark Theme