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



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.




Applications are open for YC Winter 2018

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

Search: