Shorten your Google+ URL using your own domain name and nginx

If you don't happen to be a very important person, then you like many of us probably still have an ugly URL for your profile. Let's change that.

There are a number of ways to shorten a Google+ profile URL, this is just one way.

If you have your own domain name and a server running nginx, you can shorten your URL by letting /+ respond with a simple 301 (Moved Permanently). Just throw in a new location block in your server context.

location /+
  return 301;

In my case the above results in that redirects to my Google+ profile.