Google Authorship + Drupal: Part Two


Note: This is the second of two parts. Last week we talked about Google Authorship and how it works. This week we’ll look at the Drupal side of things with a module overview and how-to.

Part Two: The Drupal Side of Things

Now, the fun part. Let's get Google Authorship working with Drupal 7 and set it up to scale for multiple authors and pieces of content.

There are a number of modules that can help you get Google Authorship working and it’s also possible to implement in your theme’s template files, without the aid of a contributed project. Each method has pros and cons, but should yield the same end result. To help you decide which route to go, I’ve broken down what I think are the three most effective modules in a module overview at the bottom of this post (full disclosure: I maintain the Google Authorship module...I'll do my best to stay impartial).

If you are already using the Metatag module, I suggest using Google Authorship in tandem with it. Each will work on its own, but you can use Google Authorship alongside Metatag to speed up the set-up process. I previously recommended using them in tandem altogether, but since the beta release of Google Authorship 7.x-2.0, I believe the Google Authorship module is the best solution if you are not already using Metatag.

Why not use Submitted By? I find this module is the least attractive option because it requires the same or greater amount of configuration as Metatag and it adds additional fields to all your content types. Unless you really want a custom byline that goes beyond what Drupal provides, the Google Authorship module, Metatag module, and custom theming are your best options.

Step One: Download and Enable

Start by downloading and enabling the required modules. You’ll need the Google Authorship module.

Step Two: Configure

The nice thing about using this module is that there's very little to configure. All you need to do to get it working for an author (after you’ve taken care of the Google side of things) is:

  1. Go to people overview page at and edit the user account for the author in question.
  2. There will be a new field labeled “Google+ ID,” here you’ll enter the 21 digit ID number from the author’s Google+ profile page. Be sure not to input the whole URL or the form won’t validate.
  3. Hit “Save”
  4. At this point, Google Authorship will work with its most basic funtionality and you don't need to do anything more. However, if you want to further customize it, go to the Google Authorship configuration page at
  5. Select the content types and user roles for which you want Authorship information to appear (n.b. that's the user role of the author, not the role of the user viewing the content). If you are using Metatag, go ahead and select that option so that you don't duplicate its markup. If you know your theme will override the author user account link or you will not be displaying author and date info, select the option to put the appropriate markup in the HTML head. If you want to use user accounts for bio pages, there's an option for that too.
  6. Submit and you're done.


That’s all there is to it. With that set up, Google Authorship information will automatically display for any user that has the Google+ ID properly filled in.

I won’t cover implementing authorship in a custom theme because that approach will vary from project to project, but if you read part one of this post, you should understand the main concepts enough to give you a good head start.

Module Overview

  • Google Authorship
    • What it does:
      • Adds a field to Drupal's user entity. If 'Display Author and Date' is on for that content type, and that field has been filled in with the user's Google+ ID, it rewrites the link to the user's page with a link to their Google+ profile with the the ?rel=author parameter appended to the end of the link. You can also set it up to use user accounts as bio pages and to put the appropriate markup in the HTML head if you don't want to display author information or your theme does something custom with it.
    • The Pros
      • Simple, quick, and lightweight.
      • Integrates with Metatag so you don't have to manually configure the Google Authorship portion of the Metatag module.
      • Doesn't add new fields to your content types.
      • No dependencies
    • The Cons
      • Doesn't provide any additional richsnippets options - it does one thing, Google Authorship.
  • Metatag
    • What it does
      • From the project page: "The Metatag module allows you to automatically provide structured metadata, aka 'meta tags', about your website." From the Google Authorship perspective, one can assign the rel="author" attribute per node.
    • The Pros
      • Metatag is a comprehensive SEO module which, when properly configured and utilized, can be a tremendous boost to your site.
      • Not necessarily exclusive to the other modules on this list. In fact, by installing the Google Authorship module with Metatag, Authorship meta data will work out of the box as soon as you add the G+ ID to the author's user entity.
    • The Cons
      • Metatag is a great module, but it's not as simple and lightweight as other solutions. If you're only looking for Google Authorship, you don't need everything that it provides.
      • A corollary of the above, to fully utilize the metatag module, you'll need to spend some time configuring it and have a more complex understanding of metadata and Drupal features, like how to take advantage of tokens.
  • Submitted By
    • What it does
      • From the project page: "A small module that lets you control the format of the "Submitted by" information on your content per content type. It adds a fieldset to your node edit form called Appearance that lets you put in a tokenized pattern for the text you want to display."
    • The Pros
      • Allows you to customize your bylines.
    • The Cons
      • Requires some custom configuration and adding fields yourself in order to get links to the author's Google+ profile.
  • Custom Templating
    • What it does
      • You can add fields to either content types, like bio pages, or to user entities and then in your .tpl files write the php to print these out.
    • The Pros
      • By far the most flexible and customizable.
      • Not terribly difficult if you're comfortable with PHP and doing things the 'Drupal way.'
    • The Cons
      • Nobody's done the work for you. You'll have to start from scratch.
      • You'll need to watch out for gotchas like setting author relationships even when there's no route to either the author's bio or their Google+ profile. This could harm you more than help you on your SEO. An example of this might be past employees who have blog posts, but no longer have active user accounts or bio pages, leading to 'Page not found' errors.