用 Sitemap Generator 创建 Google Sitemap

今天偶然注意到 Google 对我的站内搜索数量锐减,从前一段时间的将近 1 万 变成现在的不到 1 千了.稍加分析了一下,原来在每篇文章的页面最上方也加了站点的描述内容,最初的目的完全是为了美观,没想到搜索引擎把这些页面都当作相似页面成处理了.雅虎和百度的站内搜索结果也是类似的.
不由得想起另一个问题: Google 的爬虫到底能不能遍历我的站内所有页面 ? 似乎不太可能.回想起 Google 的 Sitemap 也发布很久了, 并且不提供联机创建 Sitemap 的功能, 已经能够说明对很多比较复杂的站点 Google 仍有不足之处. Google 推这个工具的功能恐怕也是为了用户能从客户端把信息推到搜索引擎这一端(Google 用意).
此前我的站点 Sitemap 采用的是 MT 模板的方式 ,参考 Google Sitemaps using Movable Type , 这样我的旧站的内容就忽略掉了. 我现在使用的 Dreamhost 的服务,是支持 Python 的 ,并且可以 Shell 登陆, 准备用 Google 推荐的 sitemap-generator 来”帮助Google一下”. 具体的操作在 Google 的帮助页面有很详细的说明. 需要注意的是,该工具要通过代理才可以下载,不知道其他人是不是也和我一样.


我的操作结果:

$ python sitemap_gen.py --config=dbanotes_config.xml
Reading configuration file: dbanotes_config.xml
Opened URLLIST file: example_urllist.txt
Walking DIRECTORY "/home/fenng/dbanotes.net/"
Opened ACCESSLOG file: /home/fenng/logs/dbanotes.net/http/access.log
Opened ACCESSLOG file: /home/fenng/logs/dbanotes.net/http/access.log.0
Sorting and normalizing collected URLs.
Writing Sitemap file "/home/fenng/dbanotes.net/sitemap.xml.gz" with 10855 URLs
Notifying search engines.
Notifying: www.google.com
Count of file extensions on URLs:
421  (no extension)
1  .avi
6  .back
1  .cert
2  .cfg
238  .cgi
2  .cgi-original
1  .chm
13  .conf
89  .css
9  .ctl
13  .dat
27  .db
7  .doc
12  .dump
1090  .gif
4  .gif0000644
8  .gz
261  .htm
2  .htm0000644
2244  .html
60  .ico
82  .idx
6  .inc
1  .ini
219  .jpg
382  .js
1  .lang
5  .lib
118  .lock
1  .log
1  .lst
2  .mysql
15  .pdf
1643  .php
62  .pl
1093  .pm
547  .png
9  .pod
2  .postgres
3  .py
6  .rar
6  .rdf
4  .readme
1  .rss
1  .sh
10  .sql
2  .sqlite
2  .src
1  .svg
2  .swf
1  .template
560  .tmpl
53  .tpl
59  .txt
4  .types
4  .wsdl
179  .xml
1  .xsl
15  .zip
1241  /
Number of errors: 0
Number of warnings: 0

之后更新 Google Sitemap 的配置信息,会立刻得到Google确认. 但是最后在搜索引擎中的表现,还要拭目以待.
更多阅读:Apache Cocoon sitemap concept
Updated: 2006-01-29 观察到搜索结果数量已经得到更新. 当日是 1800 多

Google+
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值