Can I import redirects?

Last update: 29 September, 2017

Yes, since Yoast SEO Premium version 1.1, you have the option to import your redirects from popular redirect plugins, like Redirection, from a .CSV file, or from the .htaccess file.

Table of Contents

Finding the import menu

  • Log in to your WordPress website. When you're logged in, you will be in your 'Dashboard'. On the left-hand side, you will see a menu. In that menu, click on 'SEO'.
  • The ‘SEO’ settings will expand providing you additional options. If you don't see the 'Tools' setting in your 'SEO' menu, please enable your advanced settings first.
    Yoast SEO > Dashboard (Advanced disabled)

    Menu with advanced settings disabled
    Enable advanced features

  • Click on 'Tools'.
    Yoast SEO > Tools
  • Click on 'Import and Export'.
  • Select the 'Import redirects' tab.
    Yoast SEO > Tools > Import and Export > Import redirects

Import from a supported redirect plugin

  • Go to the import menu following the steps above.
  • Select the redirect plugin your using.
  • Click 'Import redirects'.

Import from a .CSV file

  • Go to the import menu following the steps above.
  • Choose a file on your computer.
  • Click 'Import CSV file'.

Import From the .htaccess file

  • Go to the import menu following the steps above.
  • Copy the contents of the .htaccess file that contains the redirect commands into the white box. Redirects must be in one of the following formats:
    # Plain Redirect Form
    # Redirect [type of redirect, e.g. 301] [source] [target]Redirect 301 /family/ /school/# In this example, if a user lands on /family/ (the source)
    # they are redirected to /school/ (the target).# REGEX Redirect Format
    # RedirectMatch [type of redirect, e.g. 301] [source] [target]
    
    RedirectMatch 301 /rain /sunny/
    
    # 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/
  • Click 'Import .htaccess'.

Was this article helpful? ·