Adding "Link" Header

jwilson nginx-forum at nginx.us
Thu Feb 9 22:43:48 UTC 2012


To avoid SEO issues on my subdomains, I need to add a "Link" header to
support Google's canonical header.  The format is as follows (from
http://googlewebmastercentral.blogspot.com/2011/06/supporting-relcanonical-http-headers.html):

Link: <http://www.example.com/white-paper.html>; rel="canonical"

So, the add_header command would need to reference $uri, but it also
needs a semi-colon and double quotes.  How can I add this header to my
config?

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,222185,222185#msg-222185



More information about the nginx mailing list