WordPress简单SEO之:Canonical URL标签

可能有同学不知道Canonical有什么作用,简单说一下,由于URL格式不同,会使搜索引擎认为是重复内容而影响网页声望值,Canonical的作用就是规范URL,使网页声望值不受影响。 Google、Yahoo、Mircrosoft三大搜索引擎支持Link标签的这个Canonical属性。

下面说一下怎么在WordPress中使用Canonical:

1、先说说简单的,用Yoast开发的Wordpress插件Canonical URL plugin来规范URL,插件怎么用就不说了吧,太简单。

2、手动添加代码,找到header.php中的,在前加入以下代码:

3、前面两种方法是通用,任何WordPress用户都可以使用。针对我用的Thematic主题,要添加Canonical标签也很简单,只需要在function.php里加入以下代码即可:

function childtheme_canonical_url() { // Abscence makes the heart grow fonder}
add_filter('thematic_canonical_url','childtheme_canonical_url');

我猜~这些文章你可能也感兴趣

::分类:博客相关 . :: 标签: , , . :: 收藏:permalink. 发布评论 或Trackback:Trackback URL.

1 评论

  1. 发布于 2010年02月7日 11:48 | 永久链接

    其实我不懂这个标签

发布评论

您的邮箱 永远不会 被公布。 加 * 处为必填。

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>