[null,null,["最后更新时间 (UTC):2009-02-01。"],[[["\u003cp\u003eWebsites can now specify their preferred version of a URL for pages with duplicate or very similar content using the \u003ccode\u003erel="canonical"\u003c/code\u003e link element.\u003c/p\u003e\n"],["\u003cp\u003eThis helps search engines consolidate properties like link popularity to the preferred version and have more control over the URL displayed in search results.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003erel="canonical"\u003c/code\u003e tag is a hint, considered alongside other signals, to determine the most relevant page to show.\u003c/p\u003e\n"],["\u003cp\u003eSlight content variations between the canonical and duplicate pages are acceptable, and the tag can be used across subdomains but not across different domains.\u003c/p\u003e\n"],["\u003cp\u003eWhile implementing this is recommended, search engines will still attempt to select a preferred version and transfer link properties even without the tag.\u003c/p\u003e\n"]]],["The content introduces a method to manage duplicate content URLs. By adding a `\u003clink rel=\"canonical\"\u003e` tag within the `\u003chead\u003e` section of duplicate pages, website owners can specify their preferred URL. This helps consolidate link popularity and signals towards the chosen URL, ensuring it's favored in search results. The feature handles slight content variations and is a \"hint\" to search engines, not a command. The method works within the same domain or subdomains but not across different domains.\n"],null,["# Specify your canonical\n\nThursday, February 12, 2009\n\n\nCarpe diem on any\n[duplicate content worries](/search/blog/2008/09/demystifying-duplicate-content-penalty):\nwe now support a format that allows you to publicly specify your preferred version of a URL. If\nyour site has identical or vastly similar content that's accessible through multiple URLs, this\nformat provides you with more control over the URL returned in search results. It also helps to\nmake sure that properties such as link popularity are consolidated to your preferred version.\n\n\nLet's take our old example of a\n[site selling Swedish fish](https://bp2.blogger.com/_o5Na_9269nA/RuleCxWoOXI/AAAAAAAAAuU/akzGuAnW5nQ-h/swedish-fish.jpg).\nImagine that your preferred version of the URL and its content looks like this:\n`https://www.example.com/product.php?item=swedish-fish`\n\n\nHowever, users (and Googlebot) can access Swedish fish through multiple (not as simple) URLs. Even\nif the key information on these URLs is the same as your preferred version, they may show slight\ncontent variations due to things like sort parameters or category navigation:\n`https://www.example.com/product.php?item=swedish-fish&category=gummy-candy`\n\n\nOr they have completely identical content, but with different URLs due to things such as a\ntracking parameters or a session ID:\n`https://www.example.com/product.php?item=swedish-fish&trackingid=1234&sessionid=5678`\n\n\nNow, you can simply add this `\u003clink /\u003e` tag to specify your preferred version:\n`\u003clink rel=\"canonical\" href=\"https://www.example.com/product.php?item=swedish-fish\" /\u003e`\ninside the ` \u003chead\u003e` section of the duplicate content URLs: \n\n```\nhttps://www.example.com/product.php?item=swedish-fish&category=gummy-candy\nhttps://www.example.com/product.php?item=swedish-fish&trackingid=1234&sessionid=5678\n```\n\n\nand Google will understand that the duplicates all refer to the canonical URL:\n`https://www.example.com/product.php?item=swedish-fish`. Additional URL properties, like\nPageRank and related signals, are transferred as well.\n\nThis standard can be adopted by any search engine when crawling and indexing your site.\n\n\nOf course you may have more questions.\n[Joachim Kupke](https://research.google.com/pubs/author3778),\nan engineer from our Indexing Team, is here to provide us with the answers:\n\n\n**Is `rel=\"canonical\"` a hint or a command?** \n\nIt's a hint that we honor strongly. We'll take your preference into account, in conjunction with\nother signals, when calculating the most relevant page to display in search results.\n\n\n**Can I use a relative path to specify the canonical, such as\n`\u003clink rel=\"canonical\" href=\"product.php?item=swedish-fish\" /\u003e`?** \n\nYes, relative paths are recognized as expected with the `\u003clink /\u003e` tag. Also, if\nyou include a `\u003cbase /\u003e` link in your document, relative paths will resolve\naccording to the base URL.\n\n\n**Is it okay if the canonical is not an exact duplicate of the content?** \n\nWe allow slight differences, for example, in the sort order of a table of products. We also\nrecognize that we may crawl the canonical and the duplicate pages at different points in time,\nso we may occasionally see different versions of your content. All of that is okay with us.\n\n\n**What if the `rel=\"canonical\"` returns a `404`?** \n\nWe'll continue to index your content and use a heuristic to find a canonical, but we recommend\nthat you specify existent URLs as canonicals.\n\n\n**What if the `rel=\"canonical\"` hasn't yet been indexed?** \n\nLike all public content on the web, we strive to discover and crawl a designated canonical URL\nquickly. As soon as we index it, we'll immediately reconsider the\n`rel=\"canonical\"` hint.\n\n\n**Can `rel=\"canonical\"` be a redirect?** \n\nYes, you can specify a URL that redirects as a canonical URL. Google will then process the\nredirect as usual and try to index it.\n\n\n**What if I have contradictory `rel=\"canonical\"` designations?** \n\nOur algorithm is lenient: We can follow canonical chains, but we strongly recommend that you\nupdate links to point to a single canonical page to ensure optimal canonicalization results.\n| Update on 12/17/2009: The answer is yes! We now support a [cross-domain `rel=\"canonical\"`](/search/blog/2009/12/handling-legitimate-cross-domain) link element.\n\n\n**Can this link tag be used to suggest a canonical URL on a completely different domain?**\n\n\nNo. To migrate to a completely different domain, permanent (`301`) redirects are more\nappropriate. Google currently will take canonicalization suggestions into account across\nsubdomains (or within a domain), but not across domains. So site owners can suggest\n`www.example.com` vs. `example.com` vs. `help.example.com`, but\nnot `example.com` vs. `example-widgets.com`.\n\n\n**Sounds great---can I see a live example?** \n\nYes,\n[wikia.com](https://wikia.com/)\nhelped us as a trusted tester. For example, you'll notice that the source code on the URL\n`https://starwars.wikia.com/wiki/Nelvana_Limited` specifies its\n`rel=\"canonical\"` as: `https://starwars.wikia.com/wiki/Nelvana`.\n\n\nThe two URLs are nearly identical to each other, except that `Nelvana_Limited`, the\nfirst URL, contains a brief message near its heading. It's a good example of using this feature.\nWith `rel=\"canonical\"`, properties of the two URLs are consolidated in our index and\nsearch results display wikia.com's intended version.\n\n\nYou can ask additional questions in our comments below. And if you're unable to implement a\ncanonical designation link, no worries; we'll still do our best to select a preferred version of\nyour duplicate content URLs, and transfer linking properties,\n[just as we did before](/search/blog/2007/09/google-duplicate-content-caused-by-url).\n| **Update** : this link-tag is currently also supported by [Ask.com](https://blog.ask.com/2009/02/ask-is-going-canonical), [Microsoft Live Search](https://blogs.msdn.com/webmaster/archive/2009/02/12/partnering-to-help-solve-duplicate-content-issues.aspx) and [Yahoo!](https://ysearchblog.com/2009/02/12/fighting-duplication-adding-more-arrows-to-your-quiver/).\n\n\nFor more information, please see our Help Center articles on\n[canonicalization](/search/docs/crawling-indexing/consolidate-duplicate-urls)\nand\n[rel=canonical](/search/docs/crawling-indexing/consolidate-duplicate-urls).\n\n\nWritten by Joachim Kupke, Senior Software Engineer, and Maile Ohye, Developer Programs Tech Lead"]]