: 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
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>
More posts by @Tiffany637
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2025 All Rights reserved.