隨著百度平臺(tái)的開放,很多站長(zhǎng)開始創(chuàng)建sitemap.xml提交給百度,用來(lái)提高網(wǎng)站收錄,很多站長(zhǎng)在忙著創(chuàng)建sitemap.xml,今日跟版網(wǎng)可樂(lè)分享織夢(mèng)DEDECMS如何創(chuàng)建sitemap.xml。
導(dǎo)火索:百度作為中國(guó)第一大搜索,相繼推出了綠蘿算法和互聯(lián)網(wǎng)生態(tài),K了大批的網(wǎng)站,在站長(zhǎng)中口碑中略受影響,站長(zhǎng)普遍認(rèn)為百度是封閉的偏盈利性的組織,百度最近段時(shí)間,開放了透明了很多SEO常識(shí)和工具,用來(lái)?yè)嵛渴軅恼鹃L(zhǎng)。
織夢(mèng)本身有sitemap.xml創(chuàng)建功能,不過(guò)不太用,下面介紹的sitemap.xml符合百度sitemap.xml收錄的標(biāo)準(zhǔn)!
織夢(mèng)DEDECMS創(chuàng)建sitemap.xml步驟:
1:創(chuàng)建sitemap.xml文件,并放入模板文件夾中,sitemap.xml里面的代碼為:
<?xml version="1.0" encoding="UTF-8" ?>
<urlset xmlns="http://www.google.com/schemas/sitemap/0.9">
<url>
<loc>http://www.genban.org/</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://www.genban.org{dede:field name='typeurl'/}</loc>
<changefreq>daily</changefreq>
<priority>0.8</priority>
</url>
{/dede:channel}
{dede:arclist row=2000 orderby=pubdate}
<url>
<loc>http://www.xiuzhanwang.com[field:arcurl/]</loc>
<lastmod>[field:pubdate function=strftime('%Y-%m-%d',@me)/]</lastmod>
<changefreq>monthly</changefreq>
<priority>0.5</priority>
</url>
{/dede:arclist}
</urlset>
創(chuàng)建好文件之后,把sitemap.xml放入模板文件夾中。
溫馨提示:記得把網(wǎng)址改為自己的網(wǎng)址哦!
2:接著更新網(wǎng)站首頁(yè),設(shè)置如下圖:
方法很簡(jiǎn)單,方便修改,廣大織夢(mèng)CMS愛(ài)好者記得多分享!