How to redirect a post or page

Last update: 06 July, 2017

The redirect functionality has been created to solve problems with redirects in your WordPress site. To do this, we use relative input for redirecting. This means you do not need to enter your site address in the old URL because we already add it for you using the WordPress site address found under Settings → General → Site Address in your WordPress admin.

For the following examples, we will use http://example.com to represent the WordPress site address.

Table of Contents

Valid examples

The following examples will use http://example.com as WordPress site address.

The Old URL has to be your WordPress site address. You can enter the Old URL as http://example.com/redirect_url or as redirect_url. Both will point to the same URL.

The target URL can be both as well, but can also contain an external URL, for example: https://www.google.com.

Redirect manager

Yoast SEO for WordPress Premium includes a redirect manager.

1
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'.
2
The 'SEO' settings will expand providing you additional options. Click on 'Redirects'.
Yoast SEO > Redirects

Please keep the following in mind when creating a redirect, as most problems with redirects are due to a faulty input.

Redirect Within your WordPress site

For this example, we'll be redirecting broken URLs to the homepage or another item on your website.Yoast SEO > Redirects : Example 2

In the above example you see the following:

  1. A redirect from http://example.com/third-broken/ to http://example.com/not-broken/
  2. A redirect from http://example.com/another-broken/ to http://example.com/not-broken/
  3. A redirect from http://example.com/broken to http://example.com/

Redirect Outside of your WordPress site

For this example, we'll be redirecting a broken URL to another domain. This means that you can enter -for example- /broken-link/ to be redirected to any URL (e.g. http://example.org/). This would result in the absolute URL http://example.com/broken/ being redirected to http://example.org/.

Yoast SEO > Redirects : Example 1

Old URLs are relative!

Following from the fact that we only handle relative input we cannot redirect you from the one (sub)domain to another. So if your blog is installed on http://blog.example.com, you cannot redirect your visitors from:

To redirect people from those URLs, you'd need a WordPress install with WordPress SEO Premium activated on those URLs.

Was this article helpful? ·