Download Redirection at WordPress.org/Plugins

Easily Add Redirects to your WordPress Site for Free

Ian Svoboda Using WordPress Leave a Comment

Redirects are used whenever you delete a page or change its URL to point a visitor towards a useful page instead of a 404 – Page Not Found page. For instance, if you’re updating the look of your website and remove some old pages, you’d ideally want anyone who hits those old pages to either be directed to the new equivalent page or be taken somewhere useful. This enables visitors to continue to explore your site or search for something else.

If Google indexes a page and you then remove that page or change its URL, it will flag this in Google Search Console and recommend you create a 301 (Permanent) redirect to an appropriate replacement page. Adding redirects to your site can not only please search engines but also ensure your site’s visitors are finding relevant content and staying on your website. So being able to easily add redirects is very helpful. However, this traditionally required editing your .htaccess file or adjusting your server config to make the redirect work, which can be not only intimidating but also error-prone (.htaccess file syntax is not very intuitive).

Use a plugin to make things easy

In this case, I recommend using a plugin called Redirection. This plugin is 100% free and includes no premium/paid features. Simply put: You can get everything this plugin has to offer for absolutely free. That said: If you find the plugin useful, you should consider donating to the plugin author to support development (this option is available in the plugin settings page).

Note: If you have Yoast SEO Premium, this functionality is already included in the premium features, so you should just use that instead.

Redirection has a host of handy features including:

  • Easily set up 301/302 redirects using simple or advanced settings (such as RegEx pattern matching)
  • Automatically keep track of URL changes and create redirects automatically
  • Track 404 errors in your WordPress dashboard

How to create a Redirect

Once you’ve installed and activated Redirection, go to Tools->Redirection in your WordPress dashboard. This page will show you all of the existing redirects created within the plugin and at the bottom, there will be a form where you can manually create a redirect of your own.

Redirection - WordPress Plugin - Add Redirect

You start by entering the changed or removed URL you wish to redirect from, the Source URL. Next, you’ll enter the Target URL. This is the URL that a visitor will be taken to if they enter the Source URL you just entered.

Tip: You can use a “relative path” for redirects (i.e. /my-great-post, instead of: https://my-domain.com/my-great-post) which is helpful if your site is using multiple domains.

Clicking the gray gear next to the Add Redirect button will show additional advanced options if you need them, such as an internal label (Title) for the redirect, the type of redirect (301 or 302) and more.

Types of Redirects: 301 vs 302

301 (Permanent) redirects denote a URL that has permanently changed. You should use this type of redirect when a URL has been changed or removed.

302 (Temporary) redirects are redirects that need to happen for a temporary period of time. For instance, let’s say you’re testing different versions of a landing page, or doing a limited time promotion of some kind. You may find it useful to redirect a given URL for a period of time, and then remove the redirect.

The 3 digit number for the type of direct (301/302) refers to the associated server status code. You can read more about those here.

How to Automatically create a 301 Redirect when your URLs Update

Sometimes you may need to change the URL of a given post or page. If that URL was previously indexed by a search engine, it should have a redirect to the new URL. Redirection provides a simple setting for this in the form of a checkbox list. To access the setting, visit Tools–>Redirection, then click the Options link near the top of the page. The 5th item from the top is URL Monitor, which will have a series of checkboxes that allow you to choose which content types should be tracked for URL changes:

Redirection WordPress Plugin monitor options

You may optionally specify a group that these automatic redirects belong to using the URL Monitor Changes setting just below.

Track 404 errors in your WordPress Dashboard

While this is also something that Google Analytics does, having a list of your 404’s can be really helpful. Many of the entries you see could be for URLs that aren’t valid (i.e. they never existed in the first place). This is something that hackers do when they are trying to break into a site, but it can also be the result of a typo or a bad guess on behalf of a site visitor.

The 404 list can be accessed from the main plugin page (Tools–>Redirection) in the nav bar near the top of the page. From here you can search, view, or add redirects to detected 404 URLs. Every time someone hits your site’s 404 – Page Not Found page, that URL is recorded here so you can view information about it or easily add a redirect for that URL.

Leave a Reply

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