Michael Brunton-Spall     About     Archive     Feed

Adding Google Plus redirect to your Nginx powered site

Published on 2011-11-12 12:55:02 +0000

A quick one, this morning I’ve added the plus url to my website, so http://www.brunton-spall.co.uk/+ now redirects to my Google+ profile.

This, it turns out, is really easy to implement if you run Nginx as the front to your website.

You simply need to update your server configuration to include the following snippet:

location ~ ^/?$ {
  rewrite ^ https://plus.google.com/YOUR_NUMBER permanent;
}

This will ensure that your domain.tld/+ issues a redirect to your Google+ profile.

Hope this helps