How do I import redirects using Yoast SEO Premium?
Yoast SEO Premium includes the option to import your redirects from popular redirect plugins, from a .CSV file, or from an .htaccess file.
- Log in to your WordPress website.
When you're logged in, you will be in your 'Dashboard'.
- Click on 'SEO'
On the left-hand side, you will see a menu. In that menu, click on 'SEO'.
- Click on 'Tools'
The ‘SEO’ settings will expand providing you additional options. Click on 'Tools'.
- Click on 'Import and Export'.
- Select the 'Import redirects' tab.
- Choose an import method.
Import from a supported redirect plugin
The first option is to import from the following plugins:
Import from a CSV file
The second option is to import from a custom CSV file. This method requires that the syntax and format is correct. The syntax of the redirects stored in the .csv file is in the format of
Origin,Target,Type,Format and must use a comma separator.
Download an example .csv file here: Yoast SEO redirect example
An example of a plain redirect entry in the .csv redirects file would appear as:
An example of a RegEx redirect entry in the .csv redirects file would appear as:
Frequently Asked Questions
Yes. The CSV file can contain a mix of RegEx and Plain redirects.
No. Existing redirects are skipped during the import process. Please use the redirect manager to update existing redirects.
Yes. Especially the format column which must be in lowercase.
Yes. However, we recommend using a text editor because some spreadsheet programs may save the file in an unsupported format.
The most common cause for the CSV import to fail is the format of the file. Please download a fresh copy of the example file above and run the import again. If the example file works and your custom file does not, please check the format of the file in a text editor. If the custom file continues to fail, please contact support.
Import From the .htaccess file
The third option is to import by copying the contents of an .htaccess file and pasting them into the text box.
Redirects must be in one of the following formats:
# Redirect [type of redirect, e.g. 301] [source] [target] # In this example, if a user lands on /family/ (the source) # they are redirected to /school/ (the target). Redirect 301 /family/ /school/
# RedirectMatch [type of redirect, e.g. 301] [source] [target] # If you go to example.com/rain, you would be redirected to mydomain.com/sunny/ # However, the same goes for example.com/in-the-rain or example.com/draining. # Both would be redirected to example.com/sunny/ RedirectMatch 301 /rain /sunny/