Configuring Metatags for Drupal Websites

Drupal Metatag module allows you to automatically provide structured metadata, aka "meta tags", about a website. Meta elements are tags used in HTML or XHTML documents to provide structured metadata about a Web page. They are part of a web page's head section. Multiple Meta elements with different attributes can be used on the same page.

Meta elements can be used to specify page description, keywords and any other metadata not provided through the other head elements and attributes.You need to add in meta tags in the head section of your Drupal pages for title, description, keywords, twitter card, facebook opengraph - to make your website SEO friendly. This is all done by the Metatag module. Download and Install the module.

Drupal Metatag module allows you to automatically provide structured metadata, aka "meta tags", about a website. Meta elements are tags used in HTML or XHTML documents to provide structured metadata about a Web page. They are part of a web page's head section. Multiple Meta elements with different attributes can be used on the same page.
Meta elements can be used to specify page description, keywords and any other metadata not provided through the other head elements and attributes.You need to add in meta tags in the head section of your Drupal pages for title, description, keywords, twitter card, facebook opengraph - to make your website SEO friendly. This is all done by the Metatag module. Download and Install the module.

Using Drupal Metatag module we can configure the following

  • Configuring Meta tags for home page(front page).
  • Configuring Meta tags for a Content type.
  • Configuring Meta tags for view pages.

1) Configuring Meta tags for home page/front page.

After installing the module, you can edit global configurations at /admin/config/search/metatags, set the global configuration for front page. Click on the override to get into the details.

Enter page title, Description, abstract, and keywords.

Description

Enter site brief description. Make sure that the description does not exceed 150 characters because search engines won't display more than that on a results page. If you don't have either field filled out, Google will decide what to display without any input from you, so it can be very helpful to write up a snappy description for your content here.

Abstract

Enter brief Abstract (Optional) Again, keep it to fewer than 150 characters but instead of something snappy, try to be as plainly descriptive as possible.

Keywords

Enter comma separated list of keywords related to your website.

Advanced Settings

There are some important things in here that previously been handled by code.

Before selecting the desired checkbox make sure that you know what you are doing.

Google News Keywords

This is a new Meta tag that is exclusively used by Google News. You can read up on it in this post from Google.

Copyright

Pretty straight forward here and not something most will need to mess with.

Image

This one is also relatively new and can be handy for telling social networks which image they should use with a post.

Canonical URL

Canonical URLs are very useful for dealing with duplicate content issues. This is something that is often a problem on e-commerce sites where product listings are duplicated on multiple pages. For the details, Google explain as they have written up a pretty good post on the subject. Metatag does a good job of handling this by default so you probably won't need to mess with it much.

Shortlink URL

This element acts as an alternative to link shorteners. In Drupal they usually come out looking something like this:

<link rel="shortlink" href="http://example.com/node/5" />

Publisher URL

This one is actually a pretty big deal and will increase in importance over time. It links your Google+ page to your website. It's becoming very clear that Google+ is a major factor in search going forward, so I would recommend setting this one in the site-wide configuration.

Original Source

This tag is also something Google cooked up, this time to help identify the original source of content. This one may be particularly useful for news sites, but can be safely ignored by most.

Save your setting.

2) Configuring Meta tags for a Content type.

Edit global configurations at /admin/config/search/metatags, set the global configuration for Node. Click on the override to get into the details. If you want to add different metatags for different content types, then click on “Add a Metatag default” link on the top left corner of the page. Select the content type you wish to add metatag, click on add and configure.

The content type will be listed under Node. Above screen shot shows 2 content types ‘article’ and ‘job’ listed under ‘Node’. Click on edit to add metatags.

Enter Page title, description, abstract and other necessary settings. Follow the same procedure as mentioned above in configuring metatags for ‘front-page’.

3) Configuring Meta tags for View pages.

Enable “metatag:views” module which is a sub-module of metatag module.

Edit global configurations at /admin/config/search/metatags. Click on the override to get into the details.

The above setting is default setting for all view pages. To add metatags for individual view pages download and install “Metatags Views Overview” module.

This module exposes views metatags on the overview page and allows users with the "administer metatags" permission to update the metatag specific portion of the view.