Managing redirects
To manage redirects in Drupal using the Redirect module, follow these steps:-
Use your web browser to visit https://www.drupal.org/project/redirect, and then download the module .zip or .tar.gz file to your local computer.
๐ Note Ifย the Redirect module is already available in your Drupal bundle, you do not need to install it and can go to step 6.
- Log in to Drupal as the administrator.
- On the top menu bar, click Extend.
- Click Install new module.
- Under Upload a module or theme archive to install, click Select, select the file you downloaded in step 1, and then click Install. Drupal adds three modules:
- Redirect: This is the primary module for managing redirects.
- Redirect 404:ย Thisย module logs all โ404 Not Foundโย requests and enables you toย create redirects from them.
- Redirect Domain: This moduleย enables wildcard-based redirects, as well asย domain redirects. This feature isย usefulย when you move a site from an old domain to a new domain.
- On the top menu bar, click Configuration.
-
Under SEARCH AND METADATA, click URL redirects. The Redirect page appears:
- To add a manual redirect, click Add redirect:
- In the Path text box, type the redirect source.
- In the To text box, type the redirect destination.
- In the Redirect status list box, select the type of redirect.
- Click Save.
- To manage โ404 Not Foundโ redirects, click the Fix 404 pages tab.
- Toย manage domain redirects, click the Domain redirects tab.
- To manage general module settings, click the Settings tab:
- Under GLOBAL REDIRECTS, select the Enforce clean and canonical URLs check box to help maintain canonical URLs for your site.
More information
- For more information about the Redirect module, please visit https://www.drupal.org/project/redirect.
- For more information about canonical URLs, please visit https://developers.google.com/search/docs/advanced/crawling/consolidate-duplicate-urls.