How to do a 301 redirect in WordPress

This article is an easy guide to learn How to do a 301 redirect in WordPress. When you change your post and pages’ URLs or switch your website from one domain to another, it is highly advised to set up 301 redirects in WordPress.

You must prepare to make sure you do not remove all of your previous traffic elements and SEO elements for new posts and sites for your old domain when you change your WordPress website’s URL/domain.

In WordPress, it is effortless to add a 301 redirect to your posts and pages.

What is a 301 Redirect?

A 301 Redirect is one way to redirect the website to a specific position forever. There are three primary forms of redirections concerning the SEO that we can use to redirect one URL to another. Here are some forms of redirections:

  • 301, “Moved Permanently”
  • 302, “Moved Temporarily”
  • Meta Refresh

The 301 redirect shows the “Moved Permanently” URL and transfers over 90% of the search engine link juice to the latest URL.

You might start using 302 redirect or additional redirects, depending on the case, if you are not regularly going to the new URL.

In this guide, we will dive into permanent 301 redirects but you will be free to study other forms of redirects.

When are you expected to add 301 redirects?

The key reason for using 301 redirects is whether your website or a page is relocated and the user would like to put it on a different page.

You have to know when 301 redirects can be used. Let’s discuss a few cases in which 301 redirects may apply.

  • You change the installation directory for WordPress.
  • You have migrated the site to a new domain and want to point out new URLs for the existing URLs of a former website.
  • You alter the URLs (permalinks) of your posts and want to forward users visiting old pages.
  • You want to keep your homepage to the desired destination. There has been an error (Redirecting www version to non-www version of your homepage).

In all of these situations, we want the status of 301 as we have already updated the URL.

How to do a 301 redirect in WordPress?

It’s pretty quick to add a 301 redirect to WordPress. If you modify the permanent connection or the domain URL, you can use some methods in WordPress.

301 Redirect – Top 4 WordPress Plugins

Plugins make many things more manageable in WordPress, and surprisingly, few standard WordPress plugins make it very easy to add 301 redirects.

1. Simple 301 Redirects Plugin

This is another plugin for WordPress that helps you to only add 301 redirects. Easy 301 Redirects is one of WordPress’s most common plugins to do that.

How to do a 301 redirect in WordPress

Here are the steps you need to follow:

  • Download and Activate the Plugin from the WordPress Plugin Library.
  • Now, navigate to Settings >> 301 Redirects page.
  • Two clear boxes to add your OLD URL will be displayed in the Request box and a new URL in the Destination box.
  • Click Save Changes, and a 301 redirection type is automatically added.

With this Redirects plugin, you can also use Wildcards. Check the “Use Wildcards” checkbox just below the URLS boxes to use wildcards. You should also put an asterisk (*) after the name of the folder you want to redirect. See below for the image and example.

How to do a 301 redirect in WordPress

Here is the perfect example for you:

Request: /old-folder/*

Destination: /redirect-everything-here/

2. Redirection WordPress plugin

Redirection is the plugin that can be used for 301 redirections. It is also one of the most traditional WordPress repository plugins.

How to do a 301 redirect in WordPress
How to do a 301 redirect in WordPress
  • Specify your old URL and your new URL you want to forward and click Add Redirector. Set URLs to your current URL and the target URL.
  • The default type of a 301 redirect is added! And this is all you have to do.

The redirect plugin is a compelling plugin with several additional possibilities.

One of the useful features is when changing your post URL in WordPress when it automatically adds a 301 redirection.

3. Quick Page/Post Redirect Plugin

Quick Page/Post Redirect Plugin will help you add various redirects types to your Pages and posts quickly (301, 302, 307, meta).

Here are the simple steps you need follow:

  • Download and Activate the Plugin from the WordPress Plugin Library.
  • There are two ways to add redirects, “Speedy redirects” and “Specific redirects.”
  • To add Quick Redirects, Navigate to the Quick Redirects menu.
  • Open the Request URL and the Destination URL, and the plugin will automatically add 301 redirects.
How to do a 301 redirect in WordPress
  • Click on the trash icon at the end of the row to uninstall current redirects and update the redirect by pressing the pencil edit icon.
  • Specific redirects are helpfully used to redirect menu objects, redundant posts, or redirect pages to another Address.
  • You can see a meta box to add a Redirect / Destination URL (see image below).

One practical choice We want to suggest in this plugin is that if you do not want to move the search engine juice ranks on to the redirect URL, it can add the connection ‘rel=”nofollow.”

301 Redirects with .htaccess File

Through a plugin, you can quickly apply 301 redirects to a few WordPress articles and pages, so what can you do if the entire website is transferred to another domain? You can have to update yourself. htaccess file to add 301 redirects manually whether you are a pro-user or depends on your condition.

You would have to connect to your account and have FTP access, using an FTP client like FileZilla or Cyberduck.

When you have signed in, you can see a .htaccess file that should already have some details on the WordPress root of your installation.

Here is the example how the content of .htaccess file looks like.

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# END WordPress

This is the code WordPress attaches when you update or adjust the settings for your permalink..

Sum Up

Congratulations, you have finally learned How to do a 301 redirect in WordPress. Moreover, some of the visitors also asked us about How to Center Text in WordPress. Do check the dedicated article on this.

If you enjoyed this post, subscribe to our WordPress video tutorials on YouTube Channel. Remember to follow us on Pinterest.

We accept any type of suggestions from the visitors because it always motivates us to improve. Feel free to comment below.

Leave a Comment