Redirecting bloerg.net/+ to my Google+ profile

Have you seen it? The link in the top bar with the Google+ logo? It used to be

https://plus.google.com/113162113247238651811/

an unwieldy, hard-to-remember URL. For this reason, people use services such as gplus.to where you can define an URL pointing to a Google+ profile. However, I consider this a bad practice because the service is not affiliated with Google and prone to abuse.

I wasn’t really aware that is a common practice to append a + to a URL and redirecting to the profile until I read this blog post by Stefan Betz. I didn’t even notice that Google themselves use this approach to save some characters. Looks like I’m getting old and ignorant.

If you serve your site with nginx, all you have to do is to add the following redirect in /etc/nginx/nginx.conf:

location / {
    # ...
    rewrite ^(/\+)$ https://plus.google.com/113162113247238651811/ permanent;
}

This is a nice and simple alternative to vanity URLs that are still reserved for celebrities and companies.

Update: The Google+ link in the top bar points once again to the old, unwieldy URL. Google dislikes redirects when using the rel="author" attribute that is used to link a website with a “corresponding” Google+ page.