使用phpSitemapNG 插件生成google sitemap
最近做网站sitemap发现一款php插件phpSitemapNG能生成google sitemap文件,只要空间支持php就可以使用。
相关介绍:http://enarion.net/tools/phpsitemapng/
下载phpSitemapNG地址:http://enarion.net/tools/phpsitemapng/download/ 我下载Version 1.5.3 stable 版本的
解压上传到你网站目录下:例如你的目录是: /phpSitemapNG
然后访问:http://www.domain.com/phpSitemapNG/index.php
如下图:

主要配置以下几个地方:

Exclude directories :不想被索引的目录
我把
/css/
/js/
/admin/
等其他不想出现的目录都放进去
Exclude files :不想被索引的文件后缀
因为我的站是做伪静态,我就把所有的php过滤
.php
.xml
.txt
Exclude url keys:不想索引在URL中出现的关键词,这个我没有其他参数就默认
以上的都可以根据自己的实际情况来设置。
接着配置底下:

Lastmod: 最后修改时间
Priority:权重设置
Changefreq:更新频率
上面的按自己网站的实际情况相应设置。
设置好后就可以提交生成了 sumit setting
Successful: Settings written to file settings/settings.inc.php!
Info: Scanning filesystem for files now…
Info: Found 267 files on local filesystem.
Info: Crawling website now…
权重设置这个所有都是一样的,不是很完美,不过提交设置后,扫描出来文件后可以手动修改,我把首页改成1.0,分类页改成0.8。

修改好后,点击create file

顺便说一下网站目录要有可写权限。
生成成功后提交给google 点击submit google




