I would like to know how to set description and meta keywords for the front page. I use the Meta tags module for articles, but it is not working for the front page.

I use Panel as my front page.

My website is http://www.techiestuffs.com, and runs on Drupal 7.

if you see the HTML source of the front page, it only contains the following HTML:

<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<link rel="shortcut icon" href="http://www.techiestuffs.com/sites/default/files/favicon.png" type="image/png"/>
<meta name="Generator" content="Drupal 7 (http://drupal.org)"/>
<title>TechieStuffs | Stuffs for Geeks</title>

I had tried adding these functions in template.php:

function yourtheme_page_alter($page) {
  $meta_description = array(
    '#type' => 'html_tag',
    '#tag' => 'meta',
    '#attributes' => array(
    'name' => 'description',
    'content' =>  'Description about the site'

  $meta_keywords = array(
    '#type' => 'html_tag',
    '#tag' => 'meta',
    '#attributes' => array(
    'name' => 'keywords',
    'content' =>  'Some Keywords about the site'

  drupal_add_html_head($meta_description, 'meta_description');
  drupal_add_html_head($meta_keywords, 'meta_keywords');

But this function does not seems to work as you can see in my websites source code.

Does anyone know how to work out this?

  • 1
    I checked meta tag module, you can set default for front page... Apr 28, 2012 at 6:32
  • 1
    Welcome to Drupal Answer, if the answer is helpful for you consider selecting it as the correct answer. There is a checkmark below the answer ratings. ▲ ▼ √
    – niksmac
    May 6, 2013 at 4:45
  • If you are using Panels for your home page and the MetaTag module drupal.org/project/metatag you need to make sure that in addition to enabling the basic MetaTag module, you also enable MetaTag: Panel submodule. This will allow you to set metadata for panel pages.
    – kbrinner
    Mar 13, 2014 at 21:38

5 Answers 5


In drupal 6 I used Nodewords which allowed you to set meta tags on the front page as a configuration. In D7 this has been replaced by Meta Tags which may do the same thing or you.

  • But My front page is a panel so the front page ovberride doesn't work and i also tried to assign meta tags for panels but it is also not showing up.
    – Vivek R
    Dec 26, 2011 at 8:45
  • Does it work for a simple front page? It being a panel shouldn't matter I would have thought.
    – Malks
    Dec 29, 2011 at 2:21

Add them in your theme file; whichever theme you're using, it should have an HTML skeleton that you can change.

  • I used this code in template.php
    – Vivek R
    Dec 24, 2011 at 9:36
  • drupal_add_html_head( $meta_description, 'meta_description' ); drupal_add_html_head( $meta_keywords, 'meta_keywords' );
    – Vivek R
    Dec 24, 2011 at 9:37
  • but still meta not showing up
    – Vivek R
    Dec 24, 2011 at 9:37
  • add it statically in .tpl file of theme where you have head tag. check you theme folder and front.tpl file. Dec 24, 2011 at 9:39
  • is your meta description is dynamic ? Dec 24, 2011 at 9:40

Unfortunately, Views or Panels do not have meta tags by default. If you use either one for your frontpage, you can use the Meta Tags Quick Module, which allows the addition of the main meta tags for any path that is generated by Drupal.


I'm using Path-Based Metatags option in Meta tags quick module, enable module and go to front page, you will see Path-Based Metatags option...when you click on the option, you can fill in the fields that you want, you can also set the fields that you want to display (admin/config/search/metatags_quick)...


I see this is an old thread, but in case people find and still looking for an easy solution. I didn't like the Drupal way or Meta Quick. Found this super easy module, Simple Meta, adds a tab at left side directly on every page. I edit only description and meta tag instantly appeared. https://drupal.org/project/simplemeta.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.