Drupal is a registered trademark of Dries Buytaert
Protected Pages 3.0.0 Major update available for module protected_pages (3.0.0). Commerce Core 3.3.8 Minor update available for module commerce (3.3.8). Search API HTML Element Filter 1.0.7 Minor update available for module search_api_html_element_filter (1.0.7). Layout Builder Reorder 2.0.1 Minor update available for module layout_builder_reorder (2.0.1). Ban 1.1.0 Minor update available for module ban (1.1.0). Field Formatter Range 2.0.0 Major update available for module field_formatter_range (2.0.0). Field Formatter Range 8.x-1.8 Minor update available for module field_formatter_range (8.x-1.8). Varbase Media Header 9.2.1 Minor update available for module varbase_media_header (9.2.1). Search API Solr 4.3.11 Module search_api_solr updated after 14 months of inactivity (4.3.11). Content Translation Redirect Module content_translation_redirect crossed 1,000 active installs.

Rabbit Hole

64,375 sites Security covered
View on drupal.org

This module allows you to control what happens when an entity is viewed directly on its own page. You can choose to deny access, show a "page not found" error, redirect to another URL, or allow the default behavior, and configure these settings per content type or individual item. This is useful for entities that are meant to be displayed in other contexts, rather than through their own dedicated URL.

What is this?

Rabbit Hole is a module that adds the ability to control what should happen when an entity is being viewed at its own page.

Perhaps you have a content type that never should be displayed on its own page, like an image content type that's displayed in a carousel. Rabbit Hole can prevent this node from being accessible on its own page, through node/xxx.

Options

This works by providing multiple options to control what should happen when the entity is being viewed at its own page. You have the ability to

  • Deliver an access denied page.
  • Deliver a page not found page.
  • Issue a page redirect to any path or external url.
  • Or simply display the entity (regular behavior).

This is configurable per bundle and per entity. There is also a permission that lets certain roles override Rabbit Hole completely.

Supported entities

Version Supported entities 8.x-1.x (stable, security fixes only) Nodes, Taxonomy terms, Users, Media entities, Commerce products, Groups, Files, Paragraph Library items
2.0.x (alpha, future version) All content entities 🥳

Additions

There is support for tokens when you are using the redirect option. However, it's recommended to install the Token module, which will provide you with a table of the available tokens.

Initial module development was sponsored by Odd Hill.

Rabbit Hole 2.0.0 development was sponsored by Evolving Web and DevBranch.

Additional modules

  • Rabbit hole href link alter, that rewrites the canonical link href directly to the redirect target instead of the entity to avoid the redirect.

Activity

Total releases
3
First release
Jan 2026
Latest release
4 months ago
Releases (12 mo)
3 ▲ from 0
Maintenance
Active

Release Timeline

Releases

Version Type Release date
2.0.0-beta2 Pre-release Mar 16, 2026
8.x-1.2 Stable Mar 16, 2026
8.x-1.1 Stable Jan 13, 2026