Skip to main content
drupalreleases
Release: Cms 2.2.3 — Update released for Drupal core (2.2.3)! Release: Easy Breadcrumb 2.0.11 — Minor update available for module easy_breadcrumb (2.0.11). Release: Bootstrap 8.x-3.42 — Minor update available for theme bootstrap (8.x-3.42). Release: Editoria11y Accessibility Checker 3.0.10 — Minor update available for module editoria11y (3.0.10). Release: Editoria11y Accessibility Checker 2.2.24 — Minor update available for module editoria11y (2.2.24). Release: Leaflet 10.4.13 — Minor update available for module leaflet (10.4.13). Release: Flag 5.1.1 — Minor update available for module flag (5.1.1). Release: Layout Paragraphs 3.0.0-beta5 — New beta version released for module layout_paragraphs (3.0.0-beta5). Module Revived: Bootstrap 8.x-3.41 — Theme bootstrap updated after 6 months of inactivity (8.x-3.41). Security Coverage: Component Library — Module component_library now has official Drupal security advisory coverage.

Trailing Slash

1,316 sites Security covered
View on drupal.org

This module automatically adds trailing slashes to your site's URLs, which can be beneficial for SEO. It allows you to configure which paths or entity types should have trailing slashes added.

Drupal 8

What is it?

Adds trailing slashes to all URLs you want.
For example: example.com/user/.
This feature could be usefull for SEO motivations.

How do I install it?

Install and enable this module using one of the following methods:
https://www.drupal.org/docs/8/extending-drupal-8/installing-drupal-8-mod...

When you enable this module you haven't it in action yet.

Now you have to configure it. Read Configuration section for it.

Configuration

  • To configure the module go to /admin/config/trailing-slash/settings
  • On this page you have the option to enable/disable the configuration of this module
  • List of paths
    • Write a path per line where you want a trailing slash. Paths start with slash. It is also possible to add URLs with wildcards. (e.g., '/book', '/node/*')
  • Enabled entity types
    • You can choose the entity types that you want to have a slash, for example, the taxonomy terms of a particular vocabulary or nodes of a bundle

Requirements

  • drupal::language
  • php:7.1

Supporting organizations:

idealista Sponsorship of ongoing development.

Known Issues/Bugs

None.
If you found a new one, please, open it at https://www.drupal.org/node/add/project-issue/trailing_slash

Drupal 7

What is it?

Adds trailing slashes to all Drupal generated clean URLs.
For example: example.com/user/.

How do I install it?

  1. Install and enable this module using one of the following methods:
    http://drupal.org/documentation/install/modules-themes/modules-7

  2. Add a redirect for your website that enforces trailing slashes using one of the following methods (not having duplicate pages is good for SEO):
    • Apache mod_rewrite example (in .htaccess):
      RewriteEngine On
      RewriteBase /
      RewriteCond %{REQUEST_METHOD} !=post [NC]
      RewriteRule ^(.*(?:^|/)[^/\.]+)$ $1/ [L,R=301]
      


    • IIS URL Rewrite example (in web.config):
      <configuration>
      	<system.webServer>
      		<rewrite>
      			<rules>
      				<rule name="Redirect to Trailing Slashes" stopProcessing="true">
       					<match url="^(.*(?:^|/)[^/\.]+)$" />
      					<conditions logicalGrouping="MatchAll" trackAllCaptures="false">
      						<add input="{REQUEST_METHOD}" pattern="post" negate="true" />
      					</conditions>
      					<action type="Redirect" url="{R:1}/" />
      				</rule>
      			</rules>
      		</rewrite>
      	</system.webServer>
      </configuration>


    • Global Redirect module
      Installing this module is a good way to perform global redirects if you can't or don't want to use web server configured redirects.
  3. Go to Administration » Configuration » Search and metadata » Clean URLs in Drupal and ensure that Enable trailing slashes is checked. Easy as that!!

Known Issues/Bugs

None.

Sponsors

Initial development of this module was sponsored by the Australian War Memorial.

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
5
Tracked since
Feb 2024
Latest release
3 months ago
Releases (12 mo)
1 ▲ from 0
Maintenance
Active

Release Timeline

Releases

Version Type Core Release date
2.0.0-alpha4 Pre-release 8–11 Jul 1, 2026
2.0.0-alpha3 Pre-release 8–11 Apr 3, 2024
2.0.0-alpha2 Pre-release 8–10 Feb 26, 2024
2.0.0-alpha1 Pre-release 8–10 Feb 26, 2024
2.0.x-dev Dev 8–11 Feb 26, 2024