gpt4 book ai didi

php - 替代 URL 的 SEO 重复内容问题

转载 作者:塔克拉玛干 更新时间:2023-11-03 02:34:49 27 4
gpt4 key购买 nike

我有一个 PHP 网站,可以通过页面 ID 或页面名称访问每个页面:

http://domain/page_id=ID
http://domain/page=NAME

问题是 Google 将其视为重复内容。避免案例中出现重复内容的最佳做法是什么? 303 重定向会比完全避免两个不同的 URL 指向同一页面更好吗?

最佳答案

根据 Google :

In the world of content management and online shopping systems, it's common for the same content to be accessed through multiple URLs.

因此,

Indicate the preferred URL with the rel="canonical" link element

Suppose you want http://blog.example.com/dresses/green-dresses-are-awesome/ to be the preferred URL, even though a variety of URLs can access this content. You can indicate this to search engines as follows:

Mark up the canonical page and any other variants with a rel="canonical" link element. Add a element with the attribute rel="canonical" to the section of these pages: This indicates the preferred URL to use to access the green dress post, so that the search results will be more likely to show users that URL structure. (Note: We attempt to respect this, but cannot guarantee this in all cases.)

因此,您需要做的就是将规范链接元素添加到 <head>具有绝对路径的页面部分。

关于php - 替代 URL 的 SEO 重复内容问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28607526/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com