测试 google 新闻站点地图?
Test google news sitemap?
如何测试/验证我的Google新闻站点地图?
如果我转到搜索控制台,我可以选择 add/test 站点地图。但是它说我有一个无效的 XML 标签:
父标签:出版物
标签:关键字
但我可以看到这个标签是有效的,所以我认为验证器正在将其作为普通站点地图而不是 google新闻特定站点地图进行测试:
https://support.google.com/news/publisher/answer/74288?hl=en#submitsitemap
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:news="http://www.google.com/schemas/sitemap-news/0.9">
<url>
<loc>
http://www.website.com/page
</loc>
<news:news>
<news:publication>
<news:name>Sitename/news:name>
<news:language>en</news:language>
<news:keywords>Shopping</news:keywords>
</news:publication>
<news:title>Page title here</news:title>
<news:publication_date>2015-11-12T14:16:31+00:00</news:publication_date>
</news:news>
</url>
<url>
<loc>
http://www.website.com/other-page
</loc>
<news:news>
<news:publication>
<news:name>Sitename</news:name>
<news:language>en</news:language>
<news:keywords>Shopping</news:keywords>
</news:publication>
<news:title>
Page 2 title here
</news:title>
<news:publication_date>2015-11-12T12:52:03+00:00</news:publication_date>
</news:news>
</url>
<url>
如果我转到 google 中的新闻工具主页,它告诉我该站点包含在 Google 新闻中。但是如何检查我的站点地图是否正常工作?
来自 Google 本身:Validating a News Sitemap
以下 XML 模式定义了可以出现在新闻站点地图文件中的元素和属性。新闻站点地图可以同时包含 News-specific 元素和核心站点地图元素。您可以从以下链接下载架构:
对于News-specific个元素: http://www.google.com/schemas/sitemap-news/0.9/sitemap-news.xsd.
对于核心 Sitemap 元素: http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd
有许多工具可帮助您根据这些架构验证站点地图的结构。您可以在以下每个位置找到 XML-related 工具的列表:
http://www.w3.org/XML/Schema#Tools
http://www.xml.com/pub/a/2000/12/13/schematools.html
为了根据架构验证您的新闻站点地图文件,XML 文件将需要额外的 headers,如下所示:
<?xml version='1.0' encoding='UTF-8'?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:news="http://www.google.com/schemas/sitemap-news/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
http://www.google.com/schemas/sitemap-news/0.9
http://www.google.com/schemas/sitemap-news/0.9/sitemap-news.xsd">
<url>
...
</url>
</urlset>
标签有效,但在 XML 结构中的位置错误。
<url>
<loc>
http://www.website.com/page
</loc>
<news:news>
<news:publication>
<news:name>Sitename/news:name>
<news:language>en</news:language>
</news:publication>
<news:title>Page title here</news:title>
<news:publication_date>2015-11-12T14:16:31+00:00</news:publication_date>
<news:keywords>Shopping</news:keywords>
</news:news>
</url>
如何测试/验证我的Google新闻站点地图?
如果我转到搜索控制台,我可以选择 add/test 站点地图。但是它说我有一个无效的 XML 标签:
父标签:出版物 标签:关键字
但我可以看到这个标签是有效的,所以我认为验证器正在将其作为普通站点地图而不是 google新闻特定站点地图进行测试: https://support.google.com/news/publisher/answer/74288?hl=en#submitsitemap
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:news="http://www.google.com/schemas/sitemap-news/0.9">
<url>
<loc>
http://www.website.com/page
</loc>
<news:news>
<news:publication>
<news:name>Sitename/news:name>
<news:language>en</news:language>
<news:keywords>Shopping</news:keywords>
</news:publication>
<news:title>Page title here</news:title>
<news:publication_date>2015-11-12T14:16:31+00:00</news:publication_date>
</news:news>
</url>
<url>
<loc>
http://www.website.com/other-page
</loc>
<news:news>
<news:publication>
<news:name>Sitename</news:name>
<news:language>en</news:language>
<news:keywords>Shopping</news:keywords>
</news:publication>
<news:title>
Page 2 title here
</news:title>
<news:publication_date>2015-11-12T12:52:03+00:00</news:publication_date>
</news:news>
</url>
<url>
如果我转到 google 中的新闻工具主页,它告诉我该站点包含在 Google 新闻中。但是如何检查我的站点地图是否正常工作?
来自 Google 本身:Validating a News Sitemap
以下 XML 模式定义了可以出现在新闻站点地图文件中的元素和属性。新闻站点地图可以同时包含 News-specific 元素和核心站点地图元素。您可以从以下链接下载架构:
对于News-specific个元素: http://www.google.com/schemas/sitemap-news/0.9/sitemap-news.xsd.
对于核心 Sitemap 元素: http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd
有许多工具可帮助您根据这些架构验证站点地图的结构。您可以在以下每个位置找到 XML-related 工具的列表:
http://www.w3.org/XML/Schema#Tools http://www.xml.com/pub/a/2000/12/13/schematools.html
为了根据架构验证您的新闻站点地图文件,XML 文件将需要额外的 headers,如下所示:
<?xml version='1.0' encoding='UTF-8'?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:news="http://www.google.com/schemas/sitemap-news/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
http://www.google.com/schemas/sitemap-news/0.9
http://www.google.com/schemas/sitemap-news/0.9/sitemap-news.xsd">
<url>
...
</url>
</urlset>
标签有效,但在 XML 结构中的位置错误。
<url>
<loc>
http://www.website.com/page
</loc>
<news:news>
<news:publication>
<news:name>Sitename/news:name>
<news:language>en</news:language>
</news:publication>
<news:title>Page title here</news:title>
<news:publication_date>2015-11-12T14:16:31+00:00</news:publication_date>
<news:keywords>Shopping</news:keywords>
</news:news>
</url>