Explosion Pills
Explosion Pills

Reputation: 191729

Canonical URL specification via an HTTP header

I am using a canonical URL HTTP header for search engine optimization (SEO) purposes like this:

Link: /path/to; rel='canonical'

I can't find very much information on the subject, but the few examples I've seen are in this format:

Link: <http://example.com/path/to>; rel="canonical"

So my questions are:

Upvotes: 3

Views: 579

Answers (2)

sfell77
sfell77

Reputation: 986

Canonical links are implemented by placing the "link-to" URL inside angle brackets and putting the link HTML element in the page to which it applies:

<link rel="canonical" href="http://www.link-to-page-here.com/" />

http://en.wikipedia.org/wiki/Canonical_link_element

Upvotes: 1

Julian Reschke
Julian Reschke

Reputation: 41997

The answers are in http://greenbytes.de/tech/webdav/rfc5988.html#rfc.section.5: so "yes", "no", and "no".

(The link relation "canonical" has it's own spec -- https://www.rfc-editor.org/rfc/rfc6596 -- but of course uses the general header field syntax defined in RFC 5988)

Upvotes: 4

Related Questions