替代 URL 的 SEO 重复内容问题

SEO duplicate content issue with alternative URLs

我有一个 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.)

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