Sign in to Craft control panel.


Look for the menu item in the sidebar called Retour.


Image Placeholder

Retour Dashboard

The dashboard will show a list of URLs and indicate whether they're currently handled with a redirect or not. Over time this list can become quite lengthy, so use the search if you're looking to check a specific URL or phrase.

Where URLs show they're not being handled (ie. there's no active redirect), you can click on the `+` icon at the end of the row to quickly create a redirect for that specific link. This will pre-populate the legacy URL on the redirect builder.

Image Placeholder
Leave the Legacy URL Match Type as Path Only.

Enter the new destination URL in the next field which can be either a full URL (eg. https://domain.com/new-page) or the path only (eg. /new-page).

Leave Exact Match as the match type.

Choose the redirect type. In most cases this will be 301 - Moved Permanently.

Save the redirect.

Redirects

The redirects screen lists all active redirects and allows new redirects to be added. These can either be added manually one by one, or imported from a CSV file.

Image Placeholder
Use the search filter to find a specific redirect.

Add a Static Redirect

Adding a new static redirect is similar to the process described above.

Image Placeholder
This time the legacy URL pattern will not be pre-populated and you can enter this manually, either as the full URL or the path only. Choose the correct match type based on your entry.

RegEx Matches

For advanced redirects that follow a common pattern it's possible to match based on a regular expression. Regular expressions can be complex, so we recommend asking us for advice. The tool at https://regexr.com/ is helpful if you understand how regular expressions work. 

RegEx matches would be common for news or events links that follow a consistent pattern. eg.

Old URL: domain.com/news/08/article-title
New URL: domain.com/news/article-title

Importing Redirects in Bulk

Bulk imports are helpful when you need to add a lot of redirects that you've prepared in a spreadsheet or CSV file.

Create a CSV file in a spreadsheet with the following headings. A couple of example rows have been included.

Image Placeholder

The first row of data in the CSV file should be the headings for the columns.

Choose the fields to import into Retour from the CSV file by dragging them in the appropriate order. Click on the x to delete an unused field.

Image Placeholder

The Match Type field must be either exactmatch or regexmatch (case sensitive). Anything left blank will be filled in with default values.





More Information


For additional information on the Retour plugin, please visit https://nystudio107.com/docs/retour/.