google sitemap的格式,作用,生成工具

在seo群里常遇到一些新手对提出有关sitemap的问题,在此统一做一个解答。

1、正视google sitemap的作用

sitemap推出的初衷是为了让spider更容易,更快地抓取到深层次的或者隐藏的网页,也就是让你的网站便于被搜索引擎收录,从这个意义上 说,sitemap对于排名的直接影响是不存在的,而对于站点结构清晰的网站,这个页面的意义也并非那么大,因为如果站点结构清晰,spider可以轻松 地抓取网页。google也提到了:

请注意 Sitemaps 协议补充而不是取代搜索引擎已用来发现网址的基于抓取的机制。通过向搜索引擎提交一个 Sitemaps(或多个 Sitemaps),可帮助搜索引擎更好地抓取您的网站。

使用此协议并不能保证搜索索引中将包含您的网页。(请注意,使用此协议不会影响 Google 对您网页进行排名的方式。)

2、生成sitemap的几个问题

1)、文件较多怎么办。

如果网站有几百万页面,显然包含到同一个sitemap文件是不适合的,单一的sitemap文件建议控制在5万个url以下,因此你可以创建多个 sitemap文件,例如 s1.xml,s2.xml,s3.xml……s36458.xml ,然后,创建一个“sitemap索引文件”,将这个文件作为你的主要sitemap,这样spider会根据这个索引文件抓取你所有的sitemap文 件,格式如下:

<?xml version=”1.0″ encoding=”UTF-8″?>
   <sitemapindex xmlns=”http://www.sitemaps.org/schemas/sitemap/0.9″>
   <sitemap>
      <loc>http://www.001pp.com/s1.xml</loc>
      <lastmod>2004-10-01T18:23:17+00:00</lastmod>
   </sitemap>
   <sitemap>
       <loc>http://www.001pp.com/s2.xml</loc>
      <lastmod>2005-01-01</lastmod>
   </sitemap>

……

   <sitemap>
       <loc>http://www.001pp.com/s36458.xml</loc>
      <lastmod>2005-01-01</lastmod>
   </sitemap>
   </sitemapindex>

2)、那种sitemap生成器比较好。

事实上,为了达到更好的效果,不建议使用sitemap生成器来创建sitemap,我们来看这样一个sitemap,请注意红色的字体

 <?xml version=”1.0″ encoding=”UTF-8″?>
  <urlset xmlns=”http://www.sitemaps.org/schemas/sitemap/0.9“>
<url>
    <loc>http://www.001pp.com/</loc>
    <lastmod>2009-01-01</lastmod>
    <changefreq>monthly</changefreq>
    <priority>1</priority>
</url><url>
    <loc>http://www.001pp.com/sousuoyinqingyouhua/</loc>
    <lastmod>2009-01-01</lastmod>
    <changefreq>monthly</changefreq>
    <priority>0.8</priority>
</url><url>
    <loc>http://www.001pp.com/sousuoyinqingyouhua/baiduquanzhong24.html</loc>
    <lastmod>2009-01-01</lastmod>
    <changefreq>monthly</changefreq>
    <priority>0.6</priority>
</url>
</urlset>
 

 sitemap其实就是一个网址列表,和rss不同的是,spider可以直接从网页获得的 title,keyword都摒弃了,只留下基本的url,更新时间(lastmod),以及2个特地加上去的属性changefreq(更新频率)以及 priority(权重),虽然这里的权重是相对值(例如上文的第一个url,权重1是和其他url相比的,第二个url权重0.8也是同本站的页面相比 而言,比第一个要低,但是比第三个url要高),并不会影响到和其他网站的排名,但是这个属性有利于让spider清楚你的网站页面的重要程度,间接地影 响这些页面的排名,而使用sitemap生成器的话,你的网站所有页面都会被标示成权重是1,这就给spider的判断带来麻烦,搞平均主义的话,重要和 不重要的页面都同样难以获得排名,因此建议自己手写,实在要使用sitemap生成器也应该手工设定一些重要页面的权重。

3)、如何完全掌握sitemap协议

可以参阅google给出的sitemap协议介绍

——————————-
from http://www.001pp.com/sousuoyinqingyouhua/googlesitemap27.html

发表评论?

0 条评论。

发表评论