Drupal is a registered trademark of Dries Buytaert
cms 2.1.3 Update released for Drupal core (2.1.3)! drupal 10.5.11 Update released for Drupal core (10.5.11)! drupal 11.3.11 Update released for Drupal core (11.3.11)! drupal 11.2.13 Update released for Drupal core (11.2.13)! drupal 10.6.10 Update released for Drupal core (10.6.10)! cms 2.1.2 Update released for Drupal core (2.1.2)! drupal 11.1.10 Update released for Drupal core (11.1.10)! drupal 10.5.10 Update released for Drupal core (10.5.10)! drupal 10.4.10 Update released for Drupal core (10.4.10)! drupal 11.2.12 Update released for Drupal core (11.2.12)! drupal 11.3.10 Update released for Drupal core (11.3.10)! drupal 10.6.9 Update released for Drupal core (10.6.9)! drupal 10.6.8 Update released for Drupal core (10.6.8)! drupal 11.3.9 Update released for Drupal core (11.3.9)! drupal 11.3.8 Update released for Drupal core (11.3.8)! drupal 11.3.7 Update released for Drupal core (11.3.7)! drupal 11.2.11 Update released for Drupal core (11.2.11)! drupal 10.6.7 Update released for Drupal core (10.6.7)! drupal 10.5.9 Update released for Drupal core (10.5.9)! cms 2.1.1 Update released for Drupal core (2.1.1)!

metatag_paths

20 sites Security covered
View on drupal.org

Assign meta tags based on URL path patterns with wildcard support.

Requirements

Installation

Install as usual, see Installing modules.

Configuration

  1. Navigate to Administration › Configuration › Search and metadata › Metatag
  2. Click "Add metatag for path pattern"
  3. Enter a label, machine name, path pattern, and "Replace empty token results"
  4. Save and configure the meta tags for the pattern

Pattern Syntax

Prefix Match (trailing /)

Matches all paths under a prefix at any depth.

Pattern Matches /news/ /news/article, /news/sports/scores /about/team/ /about/team/john, /about/team/marketing/lead

Wildcard Match (*)

Matches exactly one path segment.

Pattern Matches Does Not Match /blog/* /blog/post-1 /blog, /blog/a/b /user/*/edit /user/5/edit /user/edit

Partial Wildcard Match

Use * within a segment to match part of it.

Pattern Matches Does Not Match /blog/post-* /blog/post-1, /blog/post-2 /blog/other, /blog/post-1/extra /blog/post-*/ /blog/post-1/part-2, /blog/post-2/part-2/section-1 /blog/other/part-2

Precedence

When multiple patterns match, the most specific wins (longest non-wildcard path).

Path-based metatags are applied above global defaults but below entity-specific,
and route-specific metatags. The path-based metatags takes precedence over the
bundle, and entity type metatags.

Replace Empty Token Results

When creating a path pattern, you can enable the "Replace Empty Token Results" option. This is useful when entities have a metatag field with token-based values that may resolve to empty.

When enabled:
- If an entity's metatag contains a token (e.g., [node:title])
- And that token resolves to an empty value
- The path-based tag value will be used instead

This allows path-based defaults to act as fallbacks for missing token values.

Activity

Total releases
5
First release
Jan 2026
Latest release
3 months ago
Release cadence
7 days
Stability
0% stable

Release Timeline

Releases

Version Type Release date
1.0.0-alpha4 Pre-release Feb 25, 2026
1.0.0-alpha3 Pre-release Feb 19, 2026
1.0.0-alpha2 Pre-release Feb 10, 2026
1.0.0-alpha1 Pre-release Feb 10, 2026
1.0.x-dev Dev Jan 29, 2026