Internet Engineering Task Force (IETF) M. Ohye
Request for Comments: 6596 J. Kupke
Category: Informational April 2012
ISSN: 2070-1721
The Canonical Link Relation
Ohye & Kupke Informational [Page 1]
RFC 6596 The Canonical Link Relation April 2012 1. IntroductionThe canonical link relation specifies the preferred IRI from resources with duplicative content. Common implementations of the canonical link relation are to specify the preferred version of an IRI from duplicate pages created with the addition of IRI parameters (e.g., session IDs) or to specify the single-page version as preferred over the same content separated on multiple component pages.
2. Notational Conventions
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [RFC2119].
3. The Canonical Link Relation
The target (canonical) IRI MUST identify content that is either duplicative or a superset of the content at the context (referring) IRI. Authors who declare the canonical link relation ought to anticipate that applications such as search engines can:
Ohye & Kupke Informational [Page 2]
RFC 6596 The Canonical Link Relation April 2012
o Have different scheme names, such as "http" to "https" or "gopher" to "ftp".
Ohye & Kupke Informational [Page 3]
RFC 6596 The Canonical Link Relation April 2012
* The first page of a multi-page article or multi-page listing of items (since the first page is not duplicative or a superset of the context IRI). For example, page-2.html and page-3.html of an article SHOULD NOT specify page-1.html as the canonical. This may cause a loss of data from page-2.html and page-3.html as they will be marked duplicative of page-1.html with only content from page-1.html being processed.
4. Examples
The following example illustrates:
Ohye & Kupke Informational [Page 4]
RFC 6596 The Canonical Link Relation April 2012
Link: <http://www.example.com/page.php?item=purse>; rel="canonical"
5. Recommendations
Before adding the canonical link relation, verification of the following is RECOMMENDED:
6. IANA Considerations
IANA has registered the Canonical Link Relation below as per [RFC5988].
Ohye & Kupke Informational [Page 5]
RFC 6596 The Canonical Link Relation April 2012
Reference:
7. Security Considerations
When a site is compromised, the canonical link relation can be implemented with malicious intent to designate the attacker's IRI as the preferred version of the content. While this technique is largely unnoticeable to humans, automated programs may cluster the compromised resource as duplicative of the attacker's target IRI, transferring properties such as link popularity away from the compromised resource to the attacker's designated canonical. (Naturally, even a site that is not compromised could provide inaccurate or misleading information about which URI is canonical.)
8. Internationalization Considerations
Internationalization considerations for link relations are provided in Section 8 of [RFC5988].
9. Normative References
[REC-html401-19991224]
Ohye & Kupke Informational [Page 6]
RFC 6596 The Canonical Link Relation April 2012
[RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform
Ohye & Kupke Informational [Page 7]
RFC 6596 The Canonical Link Relation April 2012 Appendix A. ImplementationsAutomated programs that implement functionality with regard for the canonical link relation include: