网站站长工具未选取我的 Angular 7 应用程序 sitemap.xml
我有这个 sitemap.xml 文件(我隐藏了真实姓名):
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9
http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">
<url>
<loc>https://mywebsite.co.uk/</loc>
<lastmod>2018-11-28T13:11:30+00:00</lastmod>
</url>
</urlset>
在网站管理员工具中我不断收到此错误:
Your Sitemap appears to be an HTML page. Please use a supported sitemap format instead.
但我的文件是 .xml 文件。 所以我有点困惑。
最佳答案
这与 Angular 有什么关系? XML 周围有 HTML 吗?
仅 https://mywebsite.co.uk/sitemap.xml 上应该有 XML
从我的网站之一复制示例:
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://mywebsite.co.uk/</loc>
<changefreq>weekly</changefreq>
<priority>1</priority>
</url>
</urlset>
关于angular - 我的 Angular 7 应用程序 sitemap.xml 没有被网站管理员工具拾取,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53851106/