【发布时间】:2019-10-30 21:09:48
【问题描述】:
这是我的sitemap.xml的格式
<?xml version="1.0" encoding="UTF-8"?>
<urlset
xmlns="https://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance"
xmlns:xhtml="https://www.w3.org/1999/xhtml"
xsi:schemaLocation="https://www.sitemaps.org/schemas/sitemap/0.9
https://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">
<url>
<loc>https://example.com</loc>
<xhtml:link
rel="alternate"
hreflang="en-us"
href="https://example.com" />
<xhtml:link
rel="alternate"
hreflang="en-gb"
href="https://example.com/uk/" />
<xhtml:link
rel="alternate"
hreflang="x-default"
href="https://example.com" />
</url>
</urlset>
但是,搜索控制台不断向我显示第 10 行名称空间不正确的错误。
我也尝试过这里提供的解决方案:XSD For Sitemap with HREFLANG
但我得到了同样的错误。我做错了什么?
【问题讨论】: