Adding "Link" Header
António P. P. Almeida
appa at perusio.net
Thu Feb 9 23:27:30 UTC 2012
On 9 Fev 2012 22h43 WET, nginx-forum at nginx.us wrote:
> 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?
add_header Link "<$scheme://$http_host$request_uri>; rel=\"canonical\"";
--- appa
More information about the nginx
mailing list