Adding redirects can be a great tool for getting people to the right place on your website. They are especially helpful when rebuilding an old website that has URLs that will be changing.
How to Add a Redirect
There are 2 methods to adding redirects: through individual pages and through the Configuration tab.
You may only add internal redirects via this option.
- Create a page or edit an existing page.
- Navigate to URL Redirects on the right side.
- Click the Add URL redirect button.
- Type in the Path you want the redirect to come from.
- Save.
-
You can add redirects from the website to internal pages or external links via this option.
- Navigate to Manage > Configuration.
- Click Search and metadata > URL redirects > Add redirect.
- Enter the Redirect Path, labeled as "Path". This is the path you want to be redirected
- Enter the Destination Path, labeled as "To". This is the path you want the Redirect Path to be redirected towards.
- Note: The Redirect Path (aka "Path) should be a relative url, and leading slash should be omitted (Example: "redirect", not "/redirect")
- Note: The Destination Path (aka "To") must be in the form of a Drupal path, not the entire URL (Example: "/add-redirects"). Alternatively, you can insert an external link using a fully validated url (Example "https://google.com".
- Save.
Useful Links
Managing Redirects
After creating redirects, you can always access them to make changes or delete them.
- Edit an existing page or navigate to Manage > Configuration > URL Redirects
- Click Edit next to the desired redirect path
- Make changes
- Save
- Edit an existing page.
- Navigate to URL Redirects
- Select Edit for chosen redirect
- Click Delete.
- Save.
or
- Navigate to Manage > Configuration > URL Redirects.
- Edit chosen redirect and click Delete.