Create URL Redirects in WordPress using Redirection

A redirect maps one webpage to another and is a useful way to keep site visitors interacting with your site. Creators benefit from redirects mainly from traffic retention whether there was a typo in a URL, content had been removed from your site and it returns with a 404 error, or if you deal with moving or managing multiple domain names.

The redirection plugin provides a redirection manager for managing 301 redirects, logging 404 errors, migrating permalinks, and general clean up of loose ends.

Getting Started

To get started, download and install Redirection.

Begin by navigating to Plugins on the dashboard and click Add New. From here, there are two options for installation.

Option 1: Search for Redirection. Click Install Now and Activate.

Option 2: Go to the plugin page, download the zip file, and upload into the designated section under Upload Plugin.

*Check if the plugin was successfully installed and activated under Installed Plugins.

Redirection Setup Wizard

The Redirection plugin setup wizard can be found under the Plugins section with a little message box indicating that setup is required to activate the plugin.

You can also navigate to Tools > Redirection. This will also lead you to the initial setup.

Once you have started the setup, you can choose to select Monitor permalink changes which will automatically make changes.

Note: You may want to leave this unchecked if you would like more control over when to redirect pages.

Another option for setup is to log everything. Logging can include tracking redirects, 404 errors, IP logging, and other external redirects.

Once setup is finished, you will be shown the Redirections plugin page.

Create Basic Redirects

One of the main functions of the plugin is to create 301 redirects.

In order to create a redirect, navigate to Tools > Redirections > Add New.

Enter the source URL beginning with a “/”. This will be the old URL that you wish to redirect.

Enter your target URL, also beginning with a “/”.

Note: You want to avoid hard coding urls such as http://mysite/target. So just leave it as /target when entering the URLs

Keep in mind, you can set redirections from non-existent pages and posts.

Group Redirects

If you have several redirects on your site, there is an option to group them. Grouping simply allows you to organize your redirects.

To group redirects, navigate to Tools > Redirection > Groups

As mentioned by the plugin, groups are assigned to a module and will affect how redirects work within the group. Users are advised to stick to the WordPress Module if they are unsure.

Enter the group name and select the module you wish to assign.

Changing the Group

If you would like to change the assigned group for a redirect, navigate into the redirection plugin.
From here, you can stay in Redirects and edit the redirect. Once the information for the redirect expands, navigate down to Group, expand the drop down menu, and select the Group you would like.

Log Redirects

Logging and 404s are possible if the logging option is enabled. (Logging could be initially enabled during setup or can be enabled from the Options tab).

To enable logging after setup, navigate to Tools > Redirection > Options.

Redirect and 404 Logs can be enabled for: a day, a week, a month, two months, or forever.

Note: Remember to scroll to the bottom and update to ensure changes were saved.

Once logging is enabled, you can navigate to Tools > Redirection > Log tab to view any redirects that were made on your site.

Import Redirects

The redirection plugin tool also allows users to import CSV, .htaccess, and JSON files; these imports will be appended to the site’s current database. Additionally, the plugin allows for exporting redirects to JSON, SDC, Apache .htaccess, and Nginx formats as well as exporting logs for redirects and 404s.

To access these functions, navigate to Tools > Redirection > Import/Export tab. In the first half of the screen, you will have a box to import files into.

Click Add File and find the file from your device.

The second half of the screen is dedicated to exporting redirects and logs.

To export redirects, decide what you would like to export and what format you would like to download it in.

The options in the first drop down include: Everything, WordPress, Apache, and Nginx redirects.

The options in the second drop down include: JSON, CSV, .htaccess, and Nginx.

Note: The plugin offers a preview of the file to be downloaded. Click View and a window will appear below.

As mentioned, the plugin offers the option to export redirect logs and 404 logs.

Simply click on the button with the appropriate action you wish to execute.

Plugin Options

The Options tab is essentially a place for the remaining settings of the plugin.

Navigate to Tools > Redirection > Options.

As mentioned earlier, the log settings can be changed. In addition to logging, there is a section for URL settings.

Here you can choose to monitor URL changes to posts, pages, and trash. To enable these, check the appropriate checkboxes.

Once a checkbox is checked within the URL Monitor section, an additional URL Monitor Changes section will appear. Here you can choose what group to save changes to and create associated redirects.

There are also options for Default URL settings, Default query matching, auto-generating URLs, HTTP Cache Header, and Redirecting Cache (beta).

Beyond the URL section, there are a few more advanced settings and a newsletter for the Redirection plugin if you would like to keep up to date with changes.

If you have decided you want to delete all redirects, logs, and options, simply find the delete button.

Summary

The Redirection plugin provides creators with a way to redirect pages to maintain site interaction as well as log the redirects and 404s on their site. The plugin allows for simple redirect creation, grouping of redirects into specific modules, as well as in depth settings to modify what to monitor.

About The Author

2 thoughts on “Create URL Redirects in WordPress using Redirection”

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top