Hacker News new | comments | ask | show | jobs | submit login
URI canonicalization with an X-Canonical-URI HTTP header (sebastians-pamphlets.com)
2 points by genieyclo on Dec 22, 2009 | hide | past | web | favorite | 2 comments

Not sure if the author's comment form will eat my reply or not, but you should already be able to use the existing LINK header, as the idea of a canonical URL was created using a LINK element.

The spec for the LINK header is still a draft (http://tools.ietf.org/html/draft-nottingham-http-link-header...), but it's been around since before HTTP/1.1.

e.g. the current page is the canonical URL:

   Link: <>; rel=canonical
e.g. some other page is the canonical URL:

   Link: <http://foo.example/bar>; rel="canonical"

Thanks for the suggestion Vitorio, I've edited your comment (http://sebastians-pamphlets.com/x-canonical-uri-http-header/...). HTML entities work w/ most comment forms.

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact