最新消息:郑州SEO笔记与大家一起分享和学习seo知识,一起分析网站seo案例,探析seo技巧!

dedecms站点地图报错(百度站长平台提示存在无效url)

服务器 admin 784浏览

1

发现自己的一个站点在百度站长平台上提示sitemap存在无效url,看完提示后发现,地图文件当中没有显示全网址,因此找到templets/plus/sitemap.xml文件,在下面代码当中找到两处loc标签当中加上域名,地图当中就会显示整个url。例如域名是www.baidu.com,修改为:<loc>http://www.baidu.com[field:typelink /]</loc>即可。

 

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>{dede:global.cfg_basehost/}</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='6' type='top'}
<url>
<loc>[field:typelink /]</loc>
<changefreq>daily</changefreq>
<priority>0.8</priority>
</url>
{/dede:channel}

{dede:arclist row=1000 orderby=pubdate}
<url>
<loc>[field:arcurl/]</loc>
<lastmod>[field:pubdate function=strftime('%Y-%m-%d',@me)/]</lastmod>
<changefreq>monthly</changefreq>
</url>
{/dede:arclist}
</urlset>

转载请注明:郑州SEO优化_郑州网站优化 » dedecms站点地图报错(百度站长平台提示存在无效url)