<?xml version="1.0" encoding="utf-8"?>
<!-- XML文件需以utf-8编码-->
<urlset>
<!--必填-->
<url>
<!--必填,定义某一个链接的入口,每一条数据必须要用<url>和</url>来标示 -->
<loc>http://www.xxxxxx.html/000000.html</loc>
<!--必填,URL长度限制在256字节内-->
<lastmod>2012-12-01</lastmod>
<!--更新时间标签,非必填,用来表示Zui后更新时间-->
<changefreq>daily</changefreq>
<!--更新频率标签,非必填,用来告知引擎页面的更新频率 -->
<priority>0.8</priority>
<!--优先权标签,优先权值0.0-1.0,用来告知引擎该条url的优先级-->
</url>
<url>
<loc>http://www.xxxxxx.html/000001.html</loc>
<lastmod>2012-12-01</lastmod>
<changefreq>daily</changefreq>
<priority>0.8</priority>
</url>
</urlset>
标签名称 | 标签说明 | 标签类型 | 标签限制 | 是否可选 |
changefreq | 标示数据更新频率 | 字符串 | 有效值为:always、hourly、daily、weekly、monthly、yearly、never | 可选 |
lastmod | 标示数据Zui新一次更新时间 | 日期 | 时间格式为yyyy-mm-dd | 可选 |
loc | 标示该条数据的存放地址 | url | Zui小长度1个字符 Zui大长度256个字符 以"http://"开头 |
必选 |
priority | 标示优先值 | 小数 | [0.0 1.0](大于等于0小于等于1,保留一位小数)例如:< priority >0.8< priority > | 可选 |
url | url地址的开始和结束 | Zui多出现无限次 | 必选 | |
urlset | urlset用来标记整个文档的开头 | 必选 |
<?xml version="1.0" encoding="UTF-8"?> <sitemapindex> <sitemap> <loc>http://www.example.com/1.xml</loc> <lastmod>2012-12-01</lastmod> </sitemap> <sitemap> <loc>http://www.example.com/2.xml</loc> <lastmod>2012-12-01</lastmod> </sitemap> </sitemapindex>