In this post, I’ll show you how to redirect a page or URL in WordPress. You’ll learn how to set up automatic redirects, manual redirects, and wildcard redirects in WordPress.

Why Redirect Pages or URLs?

There are a number of times when you might need to redirect a post, page, or URL in WordPress. That’s when a WordPress redirect page comes in useful. 

Maybe you’ve changed the slug for a post or page. Maybe you’ve amended your permalink settings. Or maybe you’ve written a new post and want to redirect an old post to that. 

In all of these cases, you’ll need to learn how to redirect a post in WordPress. This tells browsers to go to the new URL instead of the old one.

To set up a WordPress redirect page, you’ll need to install a plugin. In this guide, I’m going to show you how to do it with the Redirection plugin. 

WordPress Redirect Tutorial Redirection plugin

Why Not Use Redirects?

Setting up redirects isn’t ideal. It slows things down for the user because the browser will go to the first URL, get the redirect message, and then go to the second URL. And there’s a risk that you’ll set up the redirect wrong or simply forget to do it after changing a URL. Not only that, but links coming through a redirected page aren’t worth as much for SEO—Google just doesn’t value them as highly.

So it’s a good idea to avoid changing your URLs altogether. To minimize changing URLs, make sure you optimize them right from the start:

How to Set Up Page and URL Redirects in WordPress

There are a few different kinds of redirect that you might want to set up for WordPress. The kinds you’ll most likely be using are:

Let’s take a look at each of these WordPress redirects.

Setting Up Automated Redirects

If you haven’t already installed the Redirection plugin for WordPress, do so now. When you first install the WordPress page redirect plugin, it gives you the option to automatically track changes to URLs and to set up redirects. The link redirect maker plugin will also check the revisions to your existing posts and pages and set up redirects from old slugs you might have used for them.

In the screenshot below, it’s picked up on a change to an existing post’s slug and added a redirect from the old slug to the new one.

Link Redirect Maker Plugin Tutorial automated slug change redirect

What if I make any changes to my slugs or URLs after activating? The link redirect maker plugin will track those and automatically set up the redirect. Below, you can see the WordPress page redirect plugin screen after making more slug changes.

Link Redirect Maker Plugin Tutorial redirection - multiple slugs
https://333001043e280352183d76d1c13296b1.safeframe.googlesyndication.com/safeframe/1-0-40/html/container.html

Advertisement

Setting Up Manual Redirects

Sometimes, the WordPress redirect plugin won’t pick up on the page redirect you need. Maybe you want your WordPress site to redirect one post to another or you want to redirect a URL on your domain to a different domain, but the WordPress redirect plugin won’t work for that.

In this case, you’ll need to set up a manual redirect without a plugin in WordPress.

Go to Tools > Redirection and scroll down to the Add new redirection section.

WordPress Redirect Tutorial add new redirect

In the Source URL field, type or paste in the URL you want to redirect from. In the Target URL field, type or paste in the URL you want to redirect to. In the Group field, either leave it as Redirections (the default) or select Modified posts if you’re directing from an old post to a newer version. This will tell browsers what kind of redirect it is.

Finally, click the Add Redirect button, and your manual redirect will be added to the list of redirects.

Setting Up Wildcard Redirects

Use a wildcard redirect when you want to redirect a set of URLs which share certain elements. For example, if you change your permalink structure, a wildcard redirect will send anyone using a link from your old structure to the same link using your new structure.

If you’ve changed your permalink structure for posts from /blog/post-name to /category/post-name, for instance, you’ll need to use a wildcard redirect to ensure anyone using the old links is redirected to the new URL.

Wildcard redirects use something called Regex, which lets you create advanced redirects. You’ll need to enable Regex functions first to set up a wildcard WordPress redirect.

Go to Tools > Redirection and scroll to the Add new redirection section of the screen.

Setting up a wildcard redirect with the Redirection plugin

In the Source URL field, type the old path to categories, with a wildcard. It needs to take the form /oldslug/(.*)$. The entry for Target URL needs to take the source /newslug/$1. Then click the Add Redirect button.

The Best WordPress Themes and Plugins on Envato Market

Explore thousands of the best WordPress Designer and leading WordPress Themes on AS Enterprises. Purchase these high-quality WordPress themes and improve your website experience for you and your visitors.