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.

  1. Log in to your WordPress website.

    When you're logged in, you will be in your 'Dashboard'.

  2. Click on 'SEO'

    On the left-hand side, you will see a menu. In that menu, click on 'SEO'.

  3. Click on 'Tools'

    The ‘SEO’ settings will expand providing you additional options. Click on 'Tools'.
    Yoast SEO Tools

  4. Click on 'Import and Export'. 

  5. Select the 'Import redirects' tab. 

  6. Choose an import method.

    Yoast SEO Premium allows you to import from supported redirect plugins, from a CSV file, or from an .htaccess file.

Import from a supported redirect plugin

The first option is to import from the following plugins:

Yoast SEO Tools Import Redirects

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

Plain Redirects

An example of a plain redirect entry in the .csv redirects file would appear as:


RegEx Redirects

An example of a RegEx redirect entry in the .csv redirects file would appear as:


Frequently Asked Questions

Can I add plain and RegEx redirects in the same file?

Yes. The CSV file can contain a mix of RegEx and Plain redirects.

Can I use the CSV import to change existing redirects?

No. Existing redirects are skipped during the import process. Please use the redirect manager to update existing redirects.

Is the CSV file case sensitive?

Yes. Especially the format column which must be in lowercase.

Can I edit the CSV file in a spreadsheet program like Excel?

Yes. However, we recommend using a text editor because some spreadsheet programs may save the file in an unsupported format.

Why is my CSV file not importing?

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:

Plain Redirects

# 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/

RegEx Redirects

# RedirectMatch [type of redirect, e.g. 301] [source] [target]
# If you go to, you would be redirected to
# However, the same goes for or
# Both would be redirected to
RedirectMatch 301 /rain /sunny/

Was this article helpful? ·