WordPress Redirections: A Complete Guide for Beginners (2024)

If you’re planning to migrate or update your site, you may need to change some of its URLs. However, this means that users who visit the old links will likely encounter a 404 error, telling them that the page can’t be found. Therefore, you might be wondering how to set up WordPress redirections on your website.

Fortunately, it’s easier than you might think. Once you have a good understanding of the different types of redirects, you can use a plugin to implement them. This way, users who land on the old URLs will be automatically redirected to the new ones. ⚙️

In this post, we’ll take a closer look at WordPress redirections and the types of redirects you can set up. Then, we’ll show you how to create them on your site.

Let’s get started! 🏃

A complete guide 📝 to #WordPress #redirections 🔁 for beginners

What are WordPress redirections?

When a user clicks on a link to a page that no longer exists, they’ll probably get a 404 error. This typically means that the page has been taken offline, or that its URL has changed:

WordPress Redirections: A Complete Guide for Beginners (1)

As a website owner, you might find yourself switching to a new content management system (for instance, from Wix to WordPress). Alternatively, you might decide to migrate to a new host. Either way, the procedure is usually quite straightforward, although some of your pages or links might break in the process.

Even if you’re not planning to migrate your site, you might still need to change your URLs. For example, while optimizing your old posts, you’ll likely have to add new keywords to the links. You might even decide to change the name of your site but keep the same slugs for your pages and posts.

In any of these scenarios, you’ll need to set up WordPress redirections. This way, anyone who comes across your old links will be redirected to the new pages. This includes search engine bots.

Without redirects, your old URLs will be flagged as broken links, which can harm your rankings in search engines. Additionally, users who land on your broken pages will probably be disappointed and exit the site.

Redirects can therefore help you preserve both your rankings and User Experience (UX). However, you should make sure that you set up the right redirections.

Types of redirects

Before we show you how to set up WordPress redirections, let’s briefly go over the different types of redirects. Typically, these include:

  • 301 redirects. These are used for pages that have been permanently moved to a new URL. For example, your about page may have moved from ourwebsite.com/who-we-are to ourwebsite.com/about-us.
  • 302/307 redirects. You can use these redirects when you want to redirect users to a new page temporarily. For example, you might be revamping your portfolio page and want to redirect visitors to the services page until it’s ready.

There are also HTTP to HTTPS redirects. If you’ve recently implemented a Secure Sockets Layer (SSL) certificate on your website, you’ll likely need to redirect the HTTP version of your site to the HTTPS one.

Otherwise, Google could treat them as two separate sites, which could be harmful to your rankings. Plus, you’ll want to make sure that users are directed to the safe version of your site.

How to set up WordPress redirections

Now, let’s look at three different ways to set up WordPress redirections. We’ll start with the easiest methods, which involve using a redirect plugin or SEO tool. Then, we’ll move on to a more difficult way and show you how to create redirections by editing your site’s files.

  1. Install the Redirection plugin
  2. Use an SEO plugin like Yoast SEO
  3. Edit the .htaccess File

1. Install the Redirection plugin 🖱️🔌

Redirection is an easy-to-use plugin that enables you to set up 301 redirects on your site. To install it, navigate to PluginsAdd New in your dashboard, and type in “redirection” in the search bar:

WordPress Redirections: A Complete Guide for Beginners (2)

Then, hit Install Now, followed by Activate:

WordPress Redirections: A Complete Guide for Beginners (3)

Now, go to ToolsRedirection and click on Start Setup. The plugin will then ask you to select a few settings. For example, you can enable Redirection to monitor URL changes and automatically set up redirects:

WordPress Redirections: A Complete Guide for Beginners (4)

Once you’ve completed the setup, you can create your first redirect:

WordPress Redirections: A Complete Guide for Beginners (5)

In the Source URL field, you’ll need to enter the slug of the old URL. For example, if the link is ourwebsite.com/who-we-are, the slug would be /who-we-are:

WordPress Redirections: A Complete Guide for Beginners (6)

In the Target URL field, enter the slug of the new URL. Finally, click on Add Redirect:

WordPress Redirections: A Complete Guide for Beginners (7)

This will be added to your list of redirections:

WordPress Redirections: A Complete Guide for Beginners (8)

That’s it – users will now be directed to the new URL!

2. Use an SEO plugin like Yoast SEO 👨‍💻🔌

Many SEO plugins enable you to set up WordPress redirections. If you’re using Yoast SEO, this feature is available with the premium version.

To set up redirections in Yoast, navigate to Yoast SEORedirects. Then, choose a redirection type.

Yoast gives you the following options:

  • 301 Moved Permanently
  • 302 Found
  • 307 Temporary Redirect
  • 410 Content Deleted
  • 451 Unavailable for Legal Reasons

In the Old URL field, simply enter the slug of the link you want to redirect. Then, enter the new slug in the URL field and hit Add Redirect.

3. Edit the .htaccess File 📝💻️

This method should only be attempted if you’re familiar with your site’s root directory, or you’re comfortable editing WordPress files. Also, you’ll want to make a backup of your site before you proceed, just in case you accidentally delete a file.

To edit your .htaccess file, you’ll need to access your site’s root directory through a File Transfer Protocol (FTP) client, like FileZilla. Alternatively, you can use the File Manager in your hosting account (which is probably easier).

Your site’s root directory will likely be labeled public_html. Inside this folder, you’ll find the .htaccess file:

WordPress Redirections: A Complete Guide for Beginners (9)

Right-click on it and select Edit. This will open the file in a text editor. Here, you’ll need to paste in the following code:

Redirect 301 /old-page.html http://www.mysite.com/new-page.html

Of course, you’ll want to replace those URLs with your own. When you’re ready, save your changes and close the file.

Go to top

Conclusion 🧐

When you move a page to a new URL, you’ll need to set up a 301 redirect (if it’s a permanent change) or a 302/307 redirect (if it’s temporary). This way, anyone who visits the old link will be directed to the new page, thus preventing 404 errors and keeping users engaged. Plus, WordPress redirections can help you preserve your rankings in search engine results.

A complete guide 📝 to #WordPress #redirections 🔁 for beginners

👉 To recap, here are three ways to create WordPress redirections:

  1. Install the Redirection plugin. 🖱️
  2. Use an SEO plugin like Yoast. 👨‍💻
  3. Edit the .htaccess file. 📝

Do you have any questions about setting up WordPress redirections? Let us know in the comments section below!

Yay! 🎉 You made it to the end of the article!

WordPress Redirections: A Complete Guide for Beginners (2024)

References

Top Articles
Latest Posts
Article information

Author: Greg O'Connell

Last Updated:

Views: 6229

Rating: 4.1 / 5 (62 voted)

Reviews: 85% of readers found this page helpful

Author information

Name: Greg O'Connell

Birthday: 1992-01-10

Address: Suite 517 2436 Jefferey Pass, Shanitaside, UT 27519

Phone: +2614651609714

Job: Education Developer

Hobby: Cooking, Gambling, Pottery, Shooting, Baseball, Singing, Snowboarding

Introduction: My name is Greg O'Connell, I am a delightful, colorful, talented, kind, lively, modern, tender person who loves writing and wants to share my knowledge and understanding with you.