为什么我的站点地图文件被认为是空的? [英] Why is my sitemap file considered empty?
本文介绍了为什么我的站点地图文件被认为是空的?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的网站根目录中有一个 robots.txt 文件,其中包含这一行:
I have a robots.txt file in the root of my site which has this one line in it:
Sitemap: http://www.awardwinnersonly.com/sitemap.xml
sitemap.xml 也在站点的根目录中,并包含以下文本:
The sitemap.xml is also in the root of the site, and contains this text:
<?xml version="1.0" encoding="UTF-8"?>
-<urlset xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9
http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>http://www.awardwinnersonly.com</loc>
<lastmod>2013-09-16</lastmod>
<changefreq>weekly</changefreq>
<priority>1.0</priority>
</url>
<url>
<loc>http://www.awardwinnersonly.com/getHugos.cshtml</loc>
<lastmod>2013-09-16</lastmod>
<changefreq>weekly</changefreq>
<priority>.7</priority>
<loc>http://www.awardwinnersonly.com/Content/pulitzers2.json</loc>
<lastmod>2013-09-16</lastmod>
<changefreq>monthly</changefreq>
<priority>.7</priority>
. . .
<loc>http://www.awardwinnersonly.com/Content/goldenglobes.json</loc>
<lastmod>2013-09-16</lastmod>
<changefreq>monthly</changefreq>
<priority>.7</priority>
</url>
</urlset>
然而,在[重新]发布我的网站并尝试导航到http://www.awardwinnersonly.com/sitemap.xml,我得到:
Yet, after [re]publishing my site, and trying to navigate to http://www.awardwinnersonly.com/sitemap.xml, I get:
This page contains the following errors:
error on line 2 at column 1: Document is empty
Below is a rendering of the page up to the first error.
(下面没有显示任何内容 - 它或多或少是白屏死机".)
(nothing is shown below that - it is more-or-less a "white screen of death.")
我的 xml 文件、robots 文件或我的处理方式有什么问题?
What is wrong with either my xml file, robots file, or how I'm going about this?
推荐答案
看起来像一个流浪的 -
进入了您的文件.
Looks like a stray -
got into your file.
$ curl -v http://www.awardwinnersonly.com/sitemap.xml
<?xml version="1.0" encoding="UTF-8"?>
-<urlset xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9
http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
这篇关于为什么我的站点地图文件被认为是空的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文