How to Create a 301 Redirect in WordPress 2024 (Beginner’s Tutorial)14 min read

create-301-redirect-in-wordpress-mssaro
Mssaro » Blog » SEO » How to Create a 301 Redirect in WordPress 2024 (Beginner’s Tutorial)

Many times we have a question about how we can permanently redirect from one URL to another URL effectively without impacting SEO. The answer is creating 301 redirects in your WordPress site.

This blog is dedicated to 301 permanent redirects; you’ll see how easily and perfectly you can implement 301 redirections in a WordPress website.

You would first understand the basics of 301 redirect and how to set up this in the WordPress website.

Let’s start step by step.

What is a 301 Redirect & How does it Work?

Before understanding the 301 redirects, first, we need to understand what it is redirecting.

Redirect simple meaning is direct from one thing to another thing.

Let’s understand this from one example

Suppose you lived at address 1 in the past, but now you have moved to address 2.

But all the people who used to know you, know only your old address 1.

So what would you like to do if someone goes to meet you at your old address 1 and doesn’t find you there?

What should you do?

Just at address 1 indicates that you have moved to the new address at address 2.

And someone would find you at address 2 easily, that’s it.

You redirected someone from address 1 to address 2.

This is redirection.

If you have moved permanently, it is called permanent redirection (301).

If you have moved temporarily, it is called temporary redirection.

In our case, you will replace your blog post /page/website URL address.

Old address 1 –> Old URL (of your website’s pages/post)

New address 2–>New URL (of your website’s pages/post)

This means you use a redirect when you want to redirect your users from your old URL to a new URL.

And if it is a permanent redirect, it is called 301 Redirect.

So there should be some way to set your old URL and new URL for redirection purposes; you’ll see this in a couple of minutes.

Many types of redirects exist as follows.

  • 301 Permanent redirect
  • 307 Temporary redirect
  • 302 Found

Now you know what 301 redirections are, the following 2 questions are important now.

  1. When do you need to use 301 redirections?
  2. How would you implement 301 redirections in WordPress?

When Should You Use a 301 Redirect?

Let’s see the following times when you can use the 301 redirects.

  • You are moving your old domain(or website) to a new domain (or website).
  • You are moving your domain to the more secure version from HTTP to HTTPS.
  • You want to change the permalink of your published blog/pages.
  • You want to remove www from your website URL

Let’s check each in detail.

Moving Old Domain to New Domain in WordPress

Suppose your old website name is https://myabc.com

If you want to change your website name to https://myxyz.com

Why do you want to change your website name (domain)?

There might be many reasons, like some legal issue, you have to change your website name.

Or you want to put some keywords in your website URL regarding your work /business.

Usually, in the beginning, we select the domain name without any research.

And after some time, we feel we should change our website name.

Old Domain –> https://myabc.com

New Domain –> https://myxyz.com

So here, you should use 301 redirects so all the users coming to your old domain would be redirected to the new domain /website.

And you would not lose any of your existing users.

Moving your Website to HTTP to HTTPS

Suppose initially you were not aware of HTTP and you had taken HTTP; now you know the importance of a secure HTTPS version & want to move your site to a secure HTTPS version

Old protocol–> HTTP

New Secured protocol–> Https

In this case, you also need to use 301 redirects so all your website potential users would be retained and redirected to your website’s secure version.

In the beginning, days suppose you were posting your blogs/articles without proper keyword research, and after some time, you developed an understanding of keyword research.

Now you want to place the primary keyword in your blog and Blog permalink (permanent URL).

In another way, if I say you want to optimize your page for a particular keyword.

In this case, also you should use 301 redirects.

Remove www from your Website URL

Sometimes you want to remove www from your website URL

Old URL –> https://www.myabc.com/

New URL –> https://myabc.com

So you can use 301 redirects.

The thumb rule is if you are making changes in your already launched website URL or published blogs/articles/pages URL, you should use 301 redirects (permanent redirects).

The last question is how to implement the 301 redirects in WordPress.

Let’s see this in the next section.

How to Implement a 301 Redirect in WordPress?

There is n number of ways to implement 301 redirects in your WordPress website.

But here I am going to explain the 2 ways I use without facing any problems.

To set up the 301 redirects in WordPress, you can use the best WordPress plug-in below.

Yoast SEO plug-in premium (paid)

Redirection plug-in (free)

Best Plug-ins for 301 Redirects in WordPress

How to Use Yoast SEO plug-in for 301 Redirect in WordPress

You can easily set your 301 redirects in the Yoast SEO premium version.

Let’s check quickly.

Example:

Suppose I want to redirect users from my old blog URL to a new blog URL.

My Old Blog URL :

https://mssaro.com/how-to-make-money-blogging

My New Blog URL (Where I want to redirect):

https://mssaro.com/how-to-earn-money-from-blog

Let’s see how to do this in Yoast SEO

Click on Yoast SEO–> Redirects

Yoast-SEO-Redirect

Note: Before using a redirect, make sure the below setting should be existing under the Settings tab

Yoast-redirect-setting

Let’s start!

Step1# Select the redirect Type as 301 Moved Permanently

Step2# Provide the Old URL as below

https://mssaro.com/how-to-make-money-blogging

or

how-to-make-money-blogging

Step 3 # Provide new URL as below.

How to Make Money Blogging in 2024 (Beginners Guide)

Or

how-to-earn-money-from-blog

Yoast-301-redirect-adding

You can also give the input below as well

Step 4 # click on Add Redirect button.

And it would be added as a redirect.

Yoast-redirect-added

Let’s check whether this redirect is working or not.

In the browser, give the URL below.

https://mssaro.com/how-to-make-money-blogging

And  Hit enter

It is being redirected to the new URL as below.

How simple is it to add 301 redirects!! In Yoast SEO.

Also, some of the best features in Yoast SEO are as follows.

It also provides some other redirects as well

  • 302 Found
  • 307 Temporary redirect
  • 410 Content Deleted
  • 451 Unavailable for Lega Reason

Yoast also redirects through a regular expression, which is a compelling feature.

But before using this, you must be aware of regular expressions.

Mainly Yoast writes redirects to the .htaccess  file,

Pro Tip: In case of any issue, you have to make sure that the .htaccess file should be writable on your server.

How to Use Redirection Plug-in for 301 Redirect in WordPress

This is one of the good free redirect plug-ins I used and found helpful.

Let’s check.

First, you need to add this plug-in to your WordPress website.

Note: I’m using my local server to explain this complete process.

Step 1# Search Redirection Plug-in WordPress dashboard

Redirection-add-pug-in

Install and make Active this Plug-in

In case of any doubt, refer to our plug-in installation guide.

Step#1  Setup Redirections plug-in in WordPress

You need to first set up this.

Click Tools–> Redirection

Start-Tools-Redirection

Redirection-setup

Click on Start Setup above.

You should check on monitor permalink changes in WordPress Post & Pages.

It would track all the permalink changes you would make for Post/page URL.

Also, if you want to keep logs so you can check this.

Click on Continue in above.

Redirection-Basic-setup-5

If you already have some existing redirects so, from here, you can import all.

As I was using the Simple 301 redirect plug-in, it is coming into the picture.

Do not worry If you don’t have any existing redirects, so ignore and click on the Continue button in the above screenshot.

Redirection-Basic-setup-6

Click on Finish Setup.

It may take some time.

Redirection-Basic-setup-8

Finally, the installation was completed.

Now you can see how you can create 301 redirects here.

Step 2#

You can click on the Ready to begin button above or

click on Tools –> Redirection

Start-Tools-Redirection

You’ll see

Redirection-301-add-redirect-1

You’ll provide the below information.

Also, click on the gear button

In this, we want to use the 301 redirect plug-in to redirection the source URL to Target URL

Source URL:

I picked one URL from my local App

http://localhost/mssaronewdev/in-worpress-website-how-to-make-running-the-stopped-website/

Match: URL only

When Matched: Redirect to the URL

With HTTP code: 301 – Moved Permanently

Target URL: I also picked one target URL from my local App.

http://localhost/mssaronewdev/how-to-use-winscp/

Group: Redirections

Redirection-301-Add-redirect-screen

Click on Add Redirect

And 301 redirection is added as below.

Redirection-301-added-redirect

Now check on my local server whether this redirection 301 is working.

mssaro

Click on the blog How to make Running the stopped WordPress website above.

It opens the redirected URL(How to use WinSCP in Uploading or Downloading the ) as below.

Which is perfect 301 redirection.

That’s it.

In this simple way, you can permanently redirect one URL to another URL (301).

This redirection plug-in has many other features as well.

You can relocate and complete your website.

You can monitor the log.

Conclusion:

Till this point, we have understood that 301 redirect is the permanent redirect from your website’s old URL to the new URL

First of all, you should try to avoid URL changes after publishing the blogs /pages.

But if you have to make changes in the permalink, always try to use a redirection mechanism; it will take care of your redirections.

And would notify search engines to reindex the new permalink structure.

You can use Yoast Premium (paid), so you can use this for 301 redirection purposes. It is effortless to handle.

If you want free redirection, you can use the Redirection plug-in, which is good enough.

In this way, you would be able to change your WordPress permalink without breaking your website.

If you are using some other good way for 301 permanent redirections, comment on this blog, I would like to add those.

Keep Smiling and Start Sharing!

Frequently Asked Questions (FAQ) on Create a 301 Redirect in WordPress

Can we redirect the URL without any plug-ins in WordPress?

Yes, you can. You’ll have to make changes to the .htaccess file.
But with the utmost care, you should change this file; otherwise, your site may break down.

How to redirect the old website to the new website?

This can be done through a 301 redirect (Permanent) or temporary redirect plug-in in WordPress. Plug-in should be installed on the old website.

What is the purpose of a 301 redirect?

The purpose of 301 redirects is to move permanently old URL /old Domain /old website to a new URL /new Domain /new website

How to set up a redirect on WordPress?

1#You must install some plug-ins like Yoast SEO (Premium) or Redirection free plug-in.
2# Add redirection through this plug-in by providing Old URL/old domain and new URL/New Domain

How to redirect a URL /page/post to another URL?

If you are using WordPress, you can use any redirection plug-in like Yoast SEO (premium) or Redirections (free) plug-in.

Can 301 redirect HTTP to HTTPS?

Yes, 301 redirects can be used for this purpose; you need to install the redirection plug-in on your HTTP website and add the redirection through HTTP to HTTPS.

How to redirect a website?

Use some redirect plug-in if you use WordPress, like Yoast SEO (Premium) or Redirection free plug-in.

In which scenario do we use 301 redirects?

Moving Old Domain to New Domain
Moving your website to HTTP to HTTPS
Making a change in your permalink of published Blog/Pages
Moving old URL to new URL
Remove www from your website URL

Why is my redirection not working?

You should clear your cached data and check; it should work now.

You might also like

Leave a Comment

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