快推365SEO问答正文

百度站长工具移动Sitemap协议的写法

2020/12/15 15:43:42

255浏览量

回答

2020/12/15 15:44:40

百度站长工具移动Sitemap协议的写法



移动Sitemap协议在标准Sitemap协议上增加了<mobile:mobile/>标签,分别为:

1、<mobile:mobile/> :移动网页

传统PC站的sitemap写法之前的文章中有介绍过,这里就不再细说了。(创建文本形式的Sitemap)



2、<mobile:mobile type="mobile"/> :移动网页  

提交移动网页的sitemap协议写法:

<?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.abc.com/index.html</loc>

<mobile:mobiletype="mobile"/>

<lastmod>2009-12-14</lastmod>

<changefreq>daily</changefreq>

<priority>0.8</priority>

</url>

</urlset>



3、<mobile:mobile type="pc,mobile"/>:自适应网页

提交自适应网页的sitemap协议写法:

<?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://www.abc.com/autoadapt.html</loc>

<mobile:mobiletype="pc,mobile"/>

<lastmod>2009-12-14</lastmod>

<changefreq>daily</changefreq>

<priority>0.8</priority>

</url>

</urlset>



4、<mobile:mobile type="htmladapt"/>:代码适配

提交代码适配网页的sitemap协议写法:

<?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://www.abc.com/htmladapt.html</loc>

<mobile:mobiletype="htmladapt"/>

<lastmod>2009-12-14</lastmod>

<changefreq>daily</changefreq>

<priority>0.8</priority>

</url>

</urlset>          


Sitemap的作用:

1、提交Sitemap给搜索引擎做为一个引导作用,方便搜索引擎索引网站。

2、搜索引擎通过Sitemap更清晰了解网站内部链接层次和结构,提高网站内容收录。

3、通过Sitemap提供网站的其他信息,比如上次更新日期、Sitemap文件的更新频率等,给百度蜘蛛作为参考。





转载来源:

此教程来源于《搜外网-夫唯SEO培训》,网址:https://www.seowhy.com/

本教程连接:https://www.seowhy.com/a/374.html,为原创表示感谢!

0+1

0+1