When a page is no longer available on your Drupal website, you need to add a URL redirect for that page. This is important because search engines will have that page indexed and it will still appear in search results. The page might be linked in other places too. For example, users may have bookmarked the page, or the page could be linked in previous email campaigns, on other websites or on social media posts. If a user clicks on any of these links, they'll get an "page cannot be found" error and the user experience will be inhibited. Also, search engines need to be instructed what to do when the URL for that page is no longer available. Adding a URL redirection will resolve these issues.
Follow these steps to add a page redirection for any URL that is no longer available:
- Log into your website using your Super User account (e.g. https://your-domain-name.com/user/login)
- Go to the Configuration section in the top tool bar
- Scroll down to the Search and Metadata section. Click the URL redirect option
- Click the Add redirect button
- Enter the URL for the page that is no longer available in the Path field
- Enter the URL for a replacement page in the To field. You can also enter the title of the page here to search for the page
- Select the Redirect status drop box and choose the 301 Moved Permanently option
- Click the Save button
Next step: Always check the redirection by going to the "old" URL and make sure you get redirected to the "new" URL.