diff --git a/custom_meta.admin.inc b/custom_meta.admin.inc
index 752e054..7de7a99 100644
--- a/custom_meta.admin.inc
+++ b/custom_meta.admin.inc
@@ -19,6 +19,12 @@ function custom_meta_form() {
     '#markup' => 'The Custom Meta module provides an interface for adding meta tags. This will add the created meta tags to the html head of all non-admin pages. NOTE: <strong>Be careful with the http-equiv meta attribute, these are added to ALL PAGES, so you could very easily break your site with redirects, expires, etc.</strong><br /><br />Formatting for tags <em>&lt;meta [Meta Attribute]="[Attribute Value]" content="[Content value]"&gt;</em>',
     '#suffix' => '</div>',
   );
+  $form['custom_meta_pages'] = array(
+    '#title' => 'Path',
+    '#description' => t('Put each path on a separate line. You can use the <code>*</code> character (asterisk) as a wildcard and the <code>~</code> character (tilde) to exclude one or more paths. Use <code>&lt;front&gt;</code> for the site front page. Only local paths (e.g. "example/page") will work, do not use relative URLs ("/example/page") or absolute URLs ("http://example.com/example/page").'),
+    '#type' => 'textarea',
+    '#default_value' => '',
+  );
   $form['custom_meta_attribute'] = array(
       '#title' => t('Meta attribute'),
       '#type' => 'select',
@@ -82,6 +88,12 @@ function custom_meta_edit_form() {
   $form = array();
   $id = arg(5);
   $tag = custom_meta_get_tags($id);
+  $form['custom_meta_pages'] = array(
+    '#title' => 'Path',
+    '#description' => t('Put each path on a separate line. You can use the <code>*</code> character (asterisk) as a wildcard and the <code>~</code> character (tilde) to exclude one or more paths. Use <code>&lt;front&gt;</code> for the site front page. Only local paths (e.g. "example/page") will work, do not use relative URLs ("/example/page") or absolute URLs ("http://example.com/example/page").'),
+    '#type' => 'textarea',
+    '#default_value' => $tag['meta_pages'],
+  );
   $form['custom_meta_attribute'] = array(
     '#title' => t('Meta attribute'),
     '#type' => 'select',
@@ -142,7 +154,7 @@ function custom_meta_form_validate($form, &$form_state) {
 function custom_meta_form_submit(&$form, &$form_state) {
   drupal_set_message(t('All your tag belong to us. Tag saved.'));
 
-  custom_meta_set_tag($form_state['values']['custom_meta_attribute'], $form_state['values']['custom_meta_attribute_value'], $form_state['values']['custom_meta_content_value']);
+  custom_meta_set_tag($form_state['values']['custom_meta_attribute'], $form_state['values']['custom_meta_attribute_value'], $form_state['values']['custom_meta_content_value'], $form_state['values']['custom_meta_pages']);
 }
 
 /**
@@ -157,7 +169,8 @@ function custom_meta_edit_form_submit(&$form, &$form_state) {
     ->fields(array(
       'meta_attr' => $form_state['input']['custom_meta_attribute'],
       'meta_attr_value' => $form_state['input']['custom_meta_attribute_value'],
-      'meta_content' => $form_state['input']['custom_meta_content_value']
+      'meta_content' => $form_state['input']['custom_meta_content_value'],
+      'meta_pages' => $form_state['input']['custom_meta_pages'],
     ))
     -> condition('meta_uid', arg(5))
     ->execute();
diff --git a/custom_meta.install b/custom_meta.install
index 61a2d7a..57c0d46 100644
--- a/custom_meta.install
+++ b/custom_meta.install
@@ -20,6 +20,11 @@ function custom_meta_schema() {
         'unsigned' => TRUE,
         'not null' => TRUE,
       ),
+      'meta_pages' => array(
+        'type' => 'text',
+        'not null' => FALSE,
+        'description' => 'List of paths on which to include the custom metatags.',
+      ),
       'meta_attr' => array(
         'description' => 'Meta attribute name',
         'type' => 'varchar',
@@ -43,4 +48,23 @@ function custom_meta_schema() {
   );
 
   return $schema;
-}
\ No newline at end of file
+}
+
+/**
+ * Set system.weight to a high value and add new meta_pages field.
+ *
+ * Custom Meta should go last so that other modules can't alter its output.
+ */
+function custom_meta_update_7000() {
+  
+  // Module weight.
+  db_update('system')
+    ->fields(array('weight' => '20'))
+    ->condition('name', 'custom_meta')
+    ->execute();
+  
+  // Add new field.
+  $table = 'custom_meta';
+  $schema = drupal_get_schema_unprocessed('custom_meta', $table);  
+  db_add_field($table, 'meta_pages', $schema['fields']['meta_pages']);
+}
diff --git a/custom_meta.module b/custom_meta.module
index b4884a9..6abe0e2 100644
--- a/custom_meta.module
+++ b/custom_meta.module
@@ -28,17 +28,20 @@ function custom_meta_init() {
   $markup = '';
   $token_data = array();
   $meta_tags = custom_meta_get_tags(NULL);
-
-  // Place tags in html head if not in admin section
+  
+  // Place tags in html head if not in admin section and the path pattern 
+  // is empty or match current path.
   if ($meta_tags && arg(0) != 'admin') {
     $token_data['node'] = menu_get_object();
     $token_data['user'] = $user;
     $token_data['term'] = (arg(0) == 'taxonomy' && arg(1) == 'term' && is_numeric(arg(2))) ? taxonomy_term_load(arg(2)) : NULL;
-
     foreach ($meta_tags as $key => $meta_tag) {
-      $tag = '<meta ' . check_plain($meta_tag['meta_attr']) . '="' . check_plain($meta_tag['meta_attr_value']) . '" content="' . check_plain($meta_tag['meta_content']) . '">';
-      $tag = token_replace($tag, array('node' => $token_data['node'], 'user' => $token_data['user'], 'term' => $token_data['term']), array('sanitize' => TRUE, 'clear' => TRUE));
-      $markup .= $tag;
+      $valid_path = _custom_meta_check_path($meta_tag['meta_pages']);
+      if ($valid_path) {
+        $tag = '<meta ' . check_plain($meta_tag['meta_attr']) . '="' . check_plain($meta_tag['meta_attr_value']) . '" content="' . check_plain($meta_tag['meta_content']) . '"/>';
+        $tag = token_replace($tag, array('node' => $token_data['node'], 'user' => $token_data['user'], 'term' => $token_data['term']), array('sanitize' => TRUE, 'clear' => TRUE));
+        $markup .= $tag;
+      }
     }
   }
 
@@ -51,6 +54,48 @@ function custom_meta_init() {
 }
 
 /**
+ * Implements hook_html_head_alter().
+ */
+function custom_meta_html_head_alter(&$elements) {
+  // Custom Meta overrides meta tags from others modules we make sure there are
+  // not duplicates.
+  $meta_tags = custom_meta_get_tags(NULL);
+  foreach ($meta_tags as $custom) {
+    if (_custom_meta_check_path($custom['meta_pages'])) {
+      _custom_meta_remove_custom_tag($custom, $elements);
+    }
+  }
+}
+
+/**
+ * Removes a meta tag from elements in the html head section.
+ */
+function _custom_meta_remove_custom_tag($tag, &$elements) {
+  foreach ($elements as $key => $element) {
+    if (isset($element['#name']) && $element['#name'] == $tag['meta_attr_value']) {
+      unset($elements[$key]);
+    }
+  }
+}
+
+/**
+ * Checks current path against a set of path patterns.
+ */
+function _custom_meta_check_path($pages = '') {
+  if (empty($pages)) {
+    return TRUE;
+  }
+  $pages = drupal_strtolower($pages);
+  $path = drupal_strtolower(drupal_get_path_alias($_GET['q']));
+  // Compare the lowercase internal and lowercase path alias (if any).
+  $page_match = drupal_match_path($path, $pages);
+  if ($path != $_GET['q']) {
+    $page_match = $page_match || drupal_match_path($_GET['q'], $pages);
+  }
+  return $page_match;
+}
+
+/**
  * Implements hook_menu().
  *
  */
@@ -119,12 +164,13 @@ function custom_meta_get_tags($id = '') {
  * @param $attr_value
  * @param $meta_content
  */
-function custom_meta_set_tag($attr, $attr_value, $meta_content) {
+function custom_meta_set_tag($attr, $attr_value, $meta_content, $meta_pages) {
   db_insert('custom_meta')
     ->fields(array(
       'meta_attr' => $attr,
       'meta_attr_value' => $attr_value,
-      'meta_content' => $meta_content
+      'meta_content' => $meta_content,
+      'meta_pages' => $meta_pages,
     ))
     ->execute();
 }
