Drupal is a registered trademark of Dries Buytaert
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)! drupal 11.3.6 Update released for Drupal core (11.3.6)! drupal 10.6.6 Update released for Drupal core (10.6.6)! cms 2.1.0 Update released for Drupal core (2.1.0)! bootstrap 8.x-3.40 Minor update available for theme bootstrap (8.x-3.40). menu_link_attributes 8.x-1.7 Minor update available for module menu_link_attributes (8.x-1.7). eca 3.1.1 Minor update available for module eca (3.1.1). layout_paragraphs 2.1.3 Minor update available for module layout_paragraphs (2.1.3). ai 1.3.3 Minor update available for module ai (1.3.3). ai 1.2.14 Minor update available for module ai (1.2.14). node_revision_delete 2.0.3 Minor update available for module node_revision_delete (2.0.3). moderated_content_bulk_publish 2.0.52 Minor update available for module moderated_content_bulk_publish (2.0.52). klaro 3.0.10 Minor update available for module klaro (3.0.10). klaro 3.0.9 Minor update available for module klaro (3.0.9). layout_paragraphs 2.1.2 Minor update available for module layout_paragraphs (2.1.2). geofield_map 11.1.8 Minor update available for module geofield_map (11.1.8).

purl

652 sites No security coverage
View on drupal.org

What is PURL?

In standard Drupal, a URL like /about-us simply points to a piece of content. PURL (Persistent URL) allows you to attach "context" to your URLs that persists as the user navigates the site.

Think of PURL as a URL-based context. It allows segments of your URL (like subdomains or path prefixes) to trigger specific site behaviors—like changing the theme, filtering content by a specific group, or switching a user's workspace—without needing a different node for every variation.

How it Works: The Three Pillars

To understand PURL, you only need to know three terms:

  1. The Provider: The "Logic." This is the module or feature that wants to use PURL (e.g., the Group module or a custom "Tenant" module).
  2. The Modifier: The "Key." This is the specific value in the URL, such as my-team or client-a.
  3. The Method: The "Location." This defines where the modifier lives in the URL.

Supported Methods:

  • Path: example.com/my-team/dashboard
  • Subdomain: my-team.example.com/dashboard
  • Domain: my-team-portal.com/dashboard
  • Query String: example.com/dashboard?workspace=my-team
  • User Agent/Header: (Advanced) Triggers context based on the browser or request headers.

Common Use Cases

  • Multi-Tenancy: Run 100 "mini-sites" from one Drupal install where each client has their own subdomain (client1.site.com, client2.site.com).
  • Group Module: Automatically filter all site content and navigation based on a "Space" prefix in the URL (/groups/marketing/...).
  • Dynamic Branding: Change the site’s CSS or Logo based on a URL prefix without changing the actual page path.
  • Persistent Tracking: Maintain a "campaign ID" in the URL across the entire user session without losing it when the user clicks a link.

For Developers: Why use PURL?

If you’ve ever tried to manually rewrite outbound links to keep a query string or a path prefix, you know it’s a nightmare. PURL handles the heavy lifting:

  • Inbound Processing: It automatically detects the modifier and stores the "Context" so your code can easily ask, "Which PURL workspace am I currently in?"
  • Outbound Rewriting: PURL hooks into Drupal’s URL generator. Once a user enters a PURL context, every link on the page is automatically updated to include that context.
  • Plugin Architecture: modernized for Drupal 10/11. You can easily create custom Provider plugins to map URL modifiers to any entity or configuration.

Activity

Total releases
1
First release
Feb 2026
Latest release
2 months ago
Release cadence
Stability
100% stable

Releases

Version Type Release date
2.0.0 Stable Feb 6, 2026