我有一个关于Photoshop教程的博客,因为我的一些教程很长,所以我决定将内容分成几部分
http://www.psd-dude.com/tutorials/how-to-make-a-coffee-stain-text-in-photoshop.aspx
http://www.psd-dude.com/tutorials/how-to-make-a-coffee-stain-text-in-photoshop.aspx?part=2
并将两个页面的canonical
rel设置为
http://www.psd-dude.com/tutorials/how-to-make-a-coffee-stain-text-in-photoshop.aspx
这比拥有2个规范链接更好吗?请注意,我希望索引的两个部分都有图像和文字。
答案 0 :(得分:0)
在这种情况下,不允许使用canonical
链接类型。
目标(规范)IRI必须在上下文(引用)IRI中识别内容的重复或内容的超集。
但是您的第二页未包含在第一页中(或与第一页相同)。
所以你有这些选择:
canonical
目标(但如果这样做,您可能会考虑首先停止提供分页版本) 。请注意,仅当分页页面don’t have separate user comments(或任何其他唯一内容)时才允许这样做。canonical
个目标。 canonical
。答案 1 :(得分:0)
您可以使用规范分页来解决:
在第一页的<head>
部分(www.psd-dude.com/tutorials/how-to-make-a-coffee-stain-text-in-photoshop.aspx)中,
添加指向序列中下一页的链接标记,如下所示:
<link rel="canonical" href="http://www.psd-dude.com/tutorials/how-to-make-a-coffee-stain-text-in-photoshop.aspx">
<link rel="next" href="http://www.psd-dude.com/tutorials/how-to-make-a-coffee-stain-text-in-photoshop.aspx?part=2">
因为这是序列中的第一个URL,所以不需要为rel =“prev”添加标记。
在第二页和第三页上,添加指向序列中上一个和下一个URL的链接。例如,您可以将以下内容添加到序列的第二页:
<link rel="prev" href="http://www.psd-dude.com/tutorials/how-to-make-a-coffee-stain-text-in-photoshop.aspx">
<link rel="canonical" href="http://www.psd-dude.com/tutorials/how-to-make-a-coffee-stain-text-in-photoshop.aspx?part=2">
<link rel="next" href="http://www.psd-dude.com/tutorials/how-to-make-a-coffee-stain-text-in-photoshop.aspx?part=3">
在序列的最后一页(www.psd-dude.com/tutorials/how-to-make-a-coffee-stain-text-in-photoshop.aspx?part=4>)中,添加指向上一个URL的链接,如下所示:
<link rel="prev" href="http://www.psd-dude.com/tutorials/how-to-make-a-coffee-stain-text-in-photoshop.aspx?part=3">
<link rel="canonical" href="http://www.psd-dude.com/tutorials/how-to-make-a-coffee-stain-text-in-photoshop.aspx?part=4">
因为这是序列中的最终网址,所以无需添加rel =“next”链接。