织梦DedeCms Googlesitemap制作方法
现在不少站长都关心搜索引擎的收录问题,但织梦DedeCms自带的网站地图给Google提交时通不过的。通过这个方法可以制作一个生成在根目录的sitemap.xml地图,可以提交给Google网站管理员工具。
首先要先建立一个仿站地图模板,将下面的代码复制到记事本。
1
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.google.com/schemas/sitemap/0.84"> <url> <loc>http://127.0.0.1/</loc> <lastmod>{dede:arclist row=1 titlelen=24 orderby=pubdate} [field:pubdate function=strftime('%Y-%m-%d',@me)/] {/dede:arclist}</lastmod> <changefreq>daily</changefreq> <priority>1.0</priority> </url> {dede:channel row='23' type='top'} <url> <loc>http://127.0.0.1[field:typelink /]</loc> <changefreq>daily</changefreq> <priority>0.8</priority> </url> {/dede:channel} {dede:arclist row=2000 orderby=pubdate} <url> <loc>http://127.0.0.1[field:arcurl/]</loc> <lastmod>[field:pubdate function=strftime('%Y-%m-%d',@me)/]</lastmod> <changefreq>monthly</changefreq> </url> {/dede:arclist} </urlset> |
将其中的 http://127.0.0.1 替换成你自己的域名地址,然后保存为 sitemap.xml 上传至你现在网站所用的模板目录下。
接着更新网站首页,设置如下图:
更新完之后,再设置回更新index.html,这样你的网站根目录下就会生成一个sitemap.xml的地图文件了。
相关仿站教程:
- 相关链接:
- 教程说明:
织梦DedeCms Googlesitemap制作方法
。