K
K
Kate2019-10-16 11:10:55
Search Engine Optimization
Kate, 2019-10-16 11:10:55

How should a sitemap be displayed for a multilingual site?

Hello!
I am creating a map via gulp-sitemap for a site with multiple languages.
Everything looks pretty good in the editor:

<?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>https://site.com/agreement.html</loc>
        <lastmod>2019-10-16T07:59:27.430Z</lastmod>
        <changefreq>monthly</changefreq>
        <xhtml:link rel="alternate" hreflang="x-default" href="https://site.com/agreement.html" />
        <xhtml:link rel="alternate" hreflang="ru-ru" href="https://site.com/ru/agreement.html" />
        <xhtml:link rel="alternate" hreflang="be-by" href="https://site.com/by/agreement.html" />
        <xhtml:link rel="alternate" hreflang="en-us" href="https://site.com/us/agreement.html" />
        <xhtml:link rel="alternate" hreflang="ru" href="https://site.com/ru/agreement.html" />
        <xhtml:link rel="alternate" hreflang="en" href="https://site.com/us/agreement.html" />
    </url>
    <url>
        <loc>https://site.com/by/agreement.html</loc>
        <lastmod>2019-10-16T07:59:27.430Z</lastmod>
        <changefreq>monthly</changefreq>
        <xhtml:link rel="alternate" hreflang="x-default" href="https://site.com/agreement.html" />
        <xhtml:link rel="alternate" hreflang="ru-ru" href="https://site.com/ru/agreement.html" />
        <xhtml:link rel="alternate" hreflang="be-by" href="https://site.com/by/agreement.html" />
        <xhtml:link rel="alternate" hreflang="en-us" href="https://site.com/us/agreement.html" />
        <xhtml:link rel="alternate" hreflang="ru" href="https://site.com/ru/agreement.html" />
        <xhtml:link rel="alternate" hreflang="en" href="https://site.com/us/agreement.html" />
    </url>
</urlset>

But in the browser it is displayed in one line . It 5da6d107ab1b8287680905.jpeg
does not give errors in search engine analytics. And if you remove the xhtml tags, then everything falls into place and all the markup is beautifully displayed in the browser. Maybe the problem is in these tags? And maybe it's normal that everything fits in one line? Who faced similar?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
9
99sun66, 2019-10-16
@99sun66

This is fine. Look in another browser. It should display fine in chrome.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question