Sitemap site map, that is, the list of web pages on the website:
1) Help Baidu find and understand all web pages on the website;
2) You can use Sitemap to provide website related information, such as update date, update frequency, etc.;
Sitemap format:
1 ) Txt text format:
List the link addresses that need to be submitted to Baidu in the txt text. Please pay attention to the submitted addresses:
① Each line of the text file must have a URL, and the URL must not have line breaks, other symbols and Chinese;
② The URL must Complete, starting with http;
③Each text contains up to 50,000 URLs and less than 10MB. If there are more than 50,000, the
list can be divided into multiple text files;
④Text files need to use UTF-8 or GBK encoding;
2) xml format:
single xml data format:
<?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>
<!--可以不提交该标签,用这个标签告诉此链接可能会出现的更新频率 -->
<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>
上面向百度提交了一个http://www.yoursite.com/yoursite.html链接;
若有多条url提交,重复<url></url>之间的片段;
3) Sitemap index format:
If you need to submit a large number of Sitemap files, you can list them in the Sitemap index file and submit the index file
as follows:
<?xml version="1.0" encoding="utf-8"?>
<!-- XML 文件需以 utf-8 编码-->
<sitemapindex>
<!--必填,以 <sitemapindex> 开始标记作为开始,以 </sitemapindex> 结束标记作为结束-->
<sitemap>
<!--必填,以<sitemap>标签提交一个子 sitemap 文件-->
<loc>http://example.com/ext/xmlsitemap/add/201201/index_20120106.xml</loc>
<!--必填,识别 sitemap 的位置-->
<lastmod>2009-12-14</lastmod>
<!--选填,识别相对 sitemap 文件的修改时间-->
</sitemap>
<!--必填,标签闭合-->
</sitemapindex>
<!--必填,标签闭合-->
有多个Sitemap,按照上述格式重复<sitemap></sitemap>之间的片断;
Mobile Sitemap protocol:
used to submit URLs to mobile search and search, add the following tags:
1) mobile:mobile/: mobile web page
2) <mobile:mobile type=“mobile”/>: mobile web page
3) <mobile:mobile type=“autoadapt”/>: self-adapted webpage, suitable for the same URL page, and the
display situation will change with different devices.
The following examples:
<?xml version="1.0" encoding="utf-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:mobile="http://www.baidu.com/schemas/sitemap-mobile/1/">
<!-- 向百度移动搜索提交-->
<url>
<loc>http://m.example.com/index.html</loc>
<mobile:mobile type="mobile"/>
<lastmod>2009-12-14</lastmod>
<changefreq>daily</changefreq>
<priority>0.8</priority>
</url>
<!-- 向百度pc搜索提交-->
<url>
<loc>http://www.example.com/index.html</loc>
<lastmod>2009-12-14</lastmod>
<changefreq>daily</changefreq>
<priority>0.8</priority>
</url>
<!-- 向百度移动和pc搜索都提交-->
<url>
<loc>http://www.example.com/autoadapt.html</loc>
<mobile:mobile type="autoadapt"/>
<lastmod>2009-12-14</lastmod>
<changefreq>daily</changefreq>
<priority>0.8</priority>
</url>
</urlset>
Note:
1) If the main domain of the website is verified, then the Sitemap file can include all the URLs under the main domain of the website;
2) If the verified www.example.com, you can only submit the URL of the verified website, not
The URLs of other websites appear .