Google 网站站长工具说我的 XML 站点地图“似乎是一个 HTML 页面”

Google Webmaster Tools says my XML sitemap “appears to be an HTML page”

我正在以 "sitemap.xml.gz" 格式提交 rails 应用程序的动态站点地图 但是 google 网站管理员工具没有为它编制索引。

我遇到了这个错误。

"Your Sitemap appears to be an HTML page. Please use a supported sitemap format instead."

我的网站有视频和图片。我正在使用 sitemap_generator gem.

创建站点地图

这是生成的站点地图。

<urlset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1" xmlns:video="http://www.google.com/schemas/sitemap-video/1.1" xmlns:geo="http://www.google.com/geo/schemas/sitemap/1.0" xmlns:news="http://www.google.com/schemas/sitemap-news/0.9" xmlns:mobile="http://www.google.com/schemas/sitemap-mobile/1.0" xmlns:pagemap="http://www.google.com/schemas/sitemap-pagemap/1.0" xmlns:xhtml="http://www.w3.org/1999/xhtml" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">
<url>
<loc>https://relatednoise.com</loc>
<lastmod>2015-07-08T15:21:48+05:30</lastmod>
<changefreq>always</changefreq>
<priority>1.0</priority>
</url>
<url>
<loc>https://relatednoise.com</loc>
<lastmod>2015-07-08T15:21:48+05:30</lastmod>
<changefreq>daily</changefreq>
<priority>0.5</priority>
</url>
<url>
<loc>https://relatednoise.com/how-it-works</loc>
<lastmod>2015-07-08T15:21:48+05:30</lastmod>
<changefreq>daily</changefreq>
<priority>0.5</priority>
</url>
<url>
<loc>https://relatednoise.com/features</loc>
<lastmod>2015-07-08T15:21:48+05:30</lastmod>
<changefreq>daily</changefreq>
<priority>0.5</priority>
</url>
<url>
<loc>https://relatednoise.com/features/for-everyone</loc>
<lastmod>2015-07-08T15:21:48+05:30</lastmod>
<changefreq>daily</changefreq>
<priority>0.5</priority>
</url>
<url>
<loc>https://relatednoise.com/features/for-brands</loc>
<lastmod>2015-07-08T15:21:48+05:30</lastmod>
<changefreq>daily</changefreq>
<priority>0.5</priority>
</url>
<url>
<loc>https://relatednoise.com/themes</loc>
<lastmod>2015-07-08T15:21:48+05:30</lastmod>
<changefreq>weekly</changefreq>
<priority>0.5</priority>
</url>
<url>

您的站点地图似乎重定向到您的主页,那就是 HTML 页面。

HTTP/1.1 302 Found
Access-Control-Allow-Origin: *
Cache-Control: no-cache
Content-Type: text/html; charset=utf-8
Date: Thu, 09 Jul 2015 20:13:46 GMT
Location: https://relatednoise.com/
Server: nginx/1 [...]