Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Deindex unpublished files

Security covered Under active development 104 sites

This module prevents unpublished media files from being publicly accessible and indexed by search engines. It offers options to either add a prefix to file URLs or move files to a private directory. The module also provides a page to identify media used only in unpublished content.

The Deindex Unpublished Files module ensures that files associated with unpublished media are not publicly accessible. It achieves this either by adding a prefix to the file URL or by moving the file to the private files directory (private://unpublishedfiles), helping protect unpublished files from being exposed or indexed by search engines.

The module functions only with media types that include a file field.
It also provides a "Unpublish media by usage page" at /admin/content/deindex-unpublished-files/unpublished-media that lists media usage (unpublished nodes, published nodes, and other entities) to help identify items that should be unpublished. Rows highlighted in light red indicate media that is only used in unpublished content.

Installation

Place the deindex_unpublished_files module folder into modules/contrib.

Clear Drupal caches if necessary.

Visit the configuration form at:
Configuration → Media → Unpublished files settings (if the module is enabled).

Configuration

Choose the method to make unpublished media files inaccessible:

Prefix method: Adds a URL prefix to prevent access.

Private files method: Moves the file to a private directory (private://unpublishedfiles).

Drupal 10–11

Ask your assistant about Deindex unpublished files

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

Depends on

Dependencies of the latest stable release

  • file Drupal core
  • media Drupal core

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
13
Tracked since
Sep 2025
Latest release
2 months ago
Releases (12 mo)
5 ▼ from 8
Maintenance
Active

Release Timeline

Releases

Version Type Core PHP Release date
1.0.10 Stable 10–11 Aug 7, 2026
1.0.9 Stable 10–11 Apr 9, 2026
1.0.8 Stable 10–11 Apr 9, 2026
1.0.7 Stable 10–11 Mar 6, 2026
1.0.6 Stable 10–11 Nov 12, 2025
1.0.5 Stable 10–11 Sep 26, 2025
1.0.4 Stable 10–11 Sep 26, 2025
1.1.x-dev Dev 11 Sep 25, 2025
1.0.3 Stable 11 Sep 24, 2025
1.0.2 Stable 11 Sep 24, 2025