Redirections
How to enable and configure redirections in your Vactory project
Redirects are essential for guiding users and search engines to the correct content, especially when URLs change or content is moved. This guide will show you how to enable and configure redirections in your Vactory project.
Accessing the Redirections Interface
To manage redirections, start by navigating to the Admin Console on your website's front end using the following path:
/fr/admin/redirects
This will take you to the redirections interface, which looks like this:
Preparing Your Redirections CSV File
Before you begin, you should have a CSV file ready to upload. This file should contain all the redirections you want to implement, formatted correctly. Each line in the CSV file represents a single redirection, with the source URL and the destination URL separated by a comma.
Here's an example:
./redirects.csv
/en/from-this,/en/to-this/en/old-news,/en/news/all?page=2&sort=desc
Important Notes:
- Relative Paths Only: Ensure that the URLs do not include the domain name; only use the path starting with /.
- No Spaces: There should be no spaces between the URLs and the comma.
Managing Existing Redirections
Before uploading a new CSV file, it's crucial to check for any existing redirections to avoid accidentally overwriting them.
- Download Existing Redirections: If there's a file in the history, download it to review the current redirections in place.
- Review the Contents: Open the downloaded CSV file and verify its contents to ensure that you are not removing any necessary redirections.
Uploading or Clearing Redirections
You have two options when managing redirections:
Option 1: Clear Existing Redirections
If you want to remove all current redirections:
- Clear the CSV File: Use the interface to clear the existing CSV file from the history.
- Confirm Removal: Make sure that you intend to remove all redirections, as this action cannot be undone.
Option 2: Upload New Redirections
To add or update redirections:
- Upload the New CSV File: Click on the upload button and select your prepared CSV file.
- Save Changes: After uploading, click on the Save button to apply the new redirections.
Finalizing Changes
After uploading or clearing redirections:
- Test the Redirections: Navigate to the old URLs in your browser to confirm that they redirect to the new locations as expected.
- Monitor for Errors: Check your website's analytics or error logs to ensure there are no broken links or issues resulting from the changes.
Troubleshooting Tips
- CSV Formatting Errors: If the redirections are not working, double-check the CSV file for formatting errors.
- Cache Issues: Sometimes, changes may not appear immediately due to caching. Clear your browser cache or test in a private browsing window.
- Backup Data: Always keep a backup of your previous redirections file before making changes.