最近在网上浏览发现人家写一篇blog第二天google 搜索engine就收录了, 查查自己的网站发现要1周以后才收录, 而且收录的也不多. 于是想起以前有人用google sitemap来帮助google bots.
历经一番搜索找到了google sitemap服务的网址 http://www.google.com/webmasters/sitemaps/ 于是看着上面的说明([url=http://www.google.com/webmasters/sitemaps/docs/en/protocol.html]英文说明点这里[/url], [url=http://www.google.com/webmasters/sitemaps/docs/zh_CN/sitemap-generator.html]中文说明点这里[/url]), 开始了摸索过程.
幸好我的服务器是用的美国的dreamhost, 支持shell登陆, 也支持Python的. 按照要求做好了config.xml文件后上传到服务器.
接下来[url=http://faq.dreamhosters.com/4_17_zh.html]使用dreamhost的shell登陆服务器[/url]执行python命令. 首先去下载个putty.exe, 用来ssh登陆服务器. 登陆后看到如下画面和提示:
[code]Using username "nethgr".
Using keyboard-interactive authentication.
Password:
Linux fundip 2.4.32-grsec+f6b+gr217+nfs+a32+fuse23+tg+++opt+c8+gr2b-v6.194 #1 SM P Tue Jun 6 15:52:09 PDT 2006 i686 GNU/Linux
_____ .___.__
_/ ____\_ __ ____ __| _/|__|_____
\ _ _\ | \/ \ / __ | | \____ \
| | | | / | \/ /_/ | | | |_> >
|__| |____/|___| /\____ | |__| __/
\/ \/ |__|
Welcome to fundip.dreamhost.com
Any malicious and/or unauthorized activity is strictly forbidden.
All activity may be logged by DreamHost Web Hosting.
[fundip]$ [/code]
[separator]
接下来可以执行命令:
[code]python sitemap_gen.py --config=config.xml[/code]
就得到反馈信息如下:
[code][fundip]$ python sitemap_gen.py --config=config.xml
Reading configuration file: config.xml
Walking DIRECTORY "/home/nethgr/nethgr.com/download/"
Walking DIRECTORY "/home/nethgr/nethgr.com/"
Opened ACCESSLOG file: /home/nethgr/logs/nethgr.com/http.2391458/access.log
Sorting and normalizing collected URLs.
Writing Sitemap file "/home/nethgr/nethgr.com/sitemap.xml.gz" with 2050 URLs
Notifying search engines.
Notifying: www.google.com
Count of file extensions on URLs:
5 (no extension)
1 .blog
35 .css
131 .doc
437 .gif
3 .htaccess
158 .htm
2 .html
183 .jpg
241 .js
13 .pdf
508 .php
33 .png
59 .ppt
1 .py
2 .rar
5 .swf
36 .txt
1 .xml
196 /
Number of errors: 0
Number of warnings: 0 [/code]
之后更新 Google Sitemap 的配置信息,会立刻得到Google确认. 但是最后在搜索引擎中的表现,还要拭目以待了. 希望对我的网站收录有所帮助, 我可是花了一晚上的时间才搞定的啊.
]]>
-
Home
-
Categories
-
Tags
链接表
-
RSS Feeds
-
Meta
Post a Comment