Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: OpenID Connect / OAuth client 3.0.0-alpha9 New alpha version released for module openid_connect (3.0.0-alpha9). Release: Opensolr Search 4.5.0 Minor update available for module opensolr_search (4.5.0). Release: Timelinr 1.0.1 Minor update available for module timelinr (1.0.1). Usage Milestone: Simplify Module simplify crossed 10,000 active installs. Usage Milestone: Views Reference Filter Module entityreference_filter crossed 10,000 active installs. Usage Milestone: Dropdown Language Module dropdown_language crossed 10,000 active installs. Usage Milestone: Paragraphs Browser Module paragraphs_browser crossed 10,000 active installs. Usage Milestone: OpenAPI Module openapi crossed 10,000 active installs. Usage Milestone: Decoupled Router Module decoupled_router crossed 10,000 active installs. Module Revived: Entityqueue Buttons 1.1.2 Module entityqueue_buttons updated after 8 months of inactivity (1.1.2).

Persistent URL

596 sites No security coverage Drupal 10–11
View on drupal.org

PURL, or Persistent URL, allows URL segments like subdomains or path prefixes to trigger specific site behaviors or filter content without needing separate site variations. It enables functionalities like multi-tenancy, dynamic branding changes, or maintaining session context across site navigation. PURL automatically detects context from the URL and rewrites outgoing links to maintain that context throughout a user's session.

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.

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

1 tracked project depends on this one

Activity

Tracked releases
3
Tracked since
Oct 2024
Latest release
2 months ago
Releases (12 mo)
2 ▲ from 1
Maintenance
Active

Release Timeline

Releases

Version Type Core Release date
2.0.1 Stable 10–11 Jun 4, 2026
2.0.0 Stable 10–11 Feb 6, 2026
8.x-1.0 Stable 9–10 Oct 3, 2024