【发布时间】:2014-02-01 21:32:05
【问题描述】:
我有一个面向公众的网站。我正在使用 sitemap.xml 文件告诉搜索引擎我网站上的网址。我还有一些服务器端代码正在读取我的 sitemap.xml 文件。事实证明,我想为每个 <url> 标签添加一些自定义属性。例如,我的 sitemap.xml 文件目前如下所示:
<?xml version="1.0" encoding="utf-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>http://www.ecofic.com/contact</loc>
<lastmod>2013-06-04</lastmod>
<changefreq>never</changefreq>
</url>
</urlset>
我想做以下事情:
<?xml version="1.0" encoding="utf-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>http://www.ecofic.com/contact</loc>
<lastmod>2013-06-04</lastmod>
<changefreq>never</changefreq>
<details author="Joe Smith" title="some title">This is a longer description of about the blog post. This will serve as a preview.</details>
</url>
</urlset>
我的问题是,这合法吗?我的意思是,搜索引擎会忽略我的自定义标签吗?或者,搜索引擎会只看到我的站点地图,将其视为无效,然后忽略整个文件吗?
谢谢
【问题讨论】: