<?xml version="1.0" encoding="utf-8"?>
<!-- XML文件需以utf-8编码-->
<urlset>
<!--必填标签-->
<url>
<!--必填标签,这是具体某一个链接的定义入口,每一条数据都要用<url>和</url>包含在里面,这是必须的 -->
<loc>http://www.yoursite.com/yoursite.html</loc>
<!--必填,URL链接地址,长度不得超过256字节-->
<lastmod>2009-12-14</lastmod>
<!--可以不提交该标签,用来指定该链接的最后更新时间-->
<changefreq>daily</changefreq>
<!--可以不提交该标签,用这个标签告诉此链接可能会出现的更新频率:always ,hourly ,daily ,weekly ,monthly ,yearly ,never -->
<priority>0.8</priority>
<!--可以不提交该标签,用来指定此链接相对于其他链接的优先权比值,此值定于0.0-1.0之间-->
</url>
<url>
<loc>http://www.yoursite.com/yoursite2.html</loc>
<lastmod>2010-05-01</lastmod>
<changefreq>daily</changefreq>
<priority>0.8</priority>
</url>
</urlset>
实际实例代码:
文件名称:m_sitemap.xml
文件内容:
<?xml version="1.0" encoding="UTF-8"?>
<urlset>
<url>
<loc>http://m.dc919.cn</loc>
<priority>1.00</priority>
<lastmod>2018-07-25</lastmod>
<changefreq>weekly</changefreq>
</url>
<url>
<loc>http://m.dc919.cn/product_86_1.html</loc>
<priority>0.5</priority>
<lastmod>2018-07-25</lastmod>
<changefreq>weekly</changefreq>
</url>
<url>
<loc>http://m.dc919.cn/product_detail_360.html</loc>
<priority>0.5</priority>
<lastmod>2018-07-25</lastmod>
<changefreq>weekly</changefreq>
</url>
<url>
<loc>http://m.dc919.cn/product_81.html</loc>
<priority>0.5</priority>
<lastmod>2018-07-25</lastmod>
<changefreq>weekly</changefreq>
</url>
<url>
<loc>http://m.dc919.cn/product_58.html</loc>
<priority>0.5</priority>
<lastmod>2018-07-25</lastmod>
<changefreq>weekly</changefreq>
</url>
<url>
<loc>http://m.dc919.cn/news_detail_270.html</loc>
<priority>0.5</priority>
<lastmod>2018-07-25</lastmod>
<changefreq>weekly</changefreq>
</url>
<url>
<loc>http://m.dc919.cn/product_66.html</loc>
<priority>0.5</priority>
<lastmod>2018-07-25</lastmod>
<changefreq>weekly</changefreq>
</url>
</urlset>