How to easily add 301 Redirects to WordPress Website?

Are you willing to know how to add 301 redirects to WordPress Website? These marvellous redirects are an SEO friendly approach that allows re-route traffic to your Website in a number of useful ways. However, they’re also confusing for many casual WordPress users. 

So to help you out I’m going to use this post to dig into 301 redirects as they apply to your WordPress site.

See Also: How to Resolve “Too many redirects error” in WordPress?

What is a Redirect in WordPress Website?

It is a way for your site to send a quick message to your reader’s browser and tell them that the page they want to visit has been moved. So their browser can automatically point them to the new page of your choice.

There are many different types of redirects such as 301 redirect, 302 redirects, 307 redirects and much more.

Let’s take a look at what does a 301 Redirect do:-

What Does a 301 Redirect Do?

Redirects are a way for you to automatically send visitors who land on Page A straight to Page B. Actually you use a redirect to automatically reroute traffic if you ever require moving a page or pages. Where, pages are like posts. Pages can be managed in a hierarchical structure in WordPress.

There are various types of redirects you can implement on your Website usually marked by a certain number. Without getting too technical these numbers typically refer to whether or not the page has moved permanently or temporarily.

1. It deals with permanent moves

It tells web browsers and search engines “hey, this page has permanently moved to a new location. So treat it like the same as the old page”. Here, search engine is a service which allows all internet user to search for any content, query, and product throughout the world wide web.

The main advantage of this permanent approach deals with SEO. According to Moz, a 301 redirect passes between 90-99% of link juice (ranking power) to the redirected page.

A 301 redirect is best to use if you wish to redirect human traffic and have your new page for maintaining the same Google rankings as the old page.

2. You Can Redirect More Than a Single Page

You can redirect multiple pages to one new page or automatically redirect entire pages that meet certain criteria for their particular new version.

When WordPress Users Need 301 Redirects

Let’s see some examples when you’d want to use a 301 redirect on your WordPress site.

  • Changing your permalink or slug structure.
  • Changing the URL of a single page or post.
  • Combining multiple posts into one.
  • Moving to HTTPS/SSL on your Website.
  • Changing your domain name.

Let’s see the two methods for adding 301 redirects to WordPress for handling various situations.

Methods to add 301 redirects to WordPress website

Adding 301 Redirects to WordPress with simple 301 Redirects

You can use a free plugin called Simple 301 Redirects for most minor 301 redirects. You can fastly create 301 redirects without leaving your WordPress dashboard and it makes it simple for managing your existing 301 redirects.

To get started, install and activate the plugin. As, plugin is defined as a type of software that contains a group of functions that can be added to a WordPress website. They are used to provide additional functionality to your application.

If you don’t know how to install or facing any sort of difficulty then move ahead to our article on How to install a Plugin in WordPress.

After the activation move ahead to Settings → 301 Redirects to begin setting up some 301 redirects:

add 301 redirects to wordpress

Redirecting a Single Page to Another Page

Let’s get started with the simple example redirecting a single post or page to another single post or page.

Let’s say you want to redirect:

yourdomain.com/old-page to yourdomain.com/new-page

You have to grab the URL of each page relative to your site’s root domain. Most of the time that means you just want to take the portion of the URL that comes after “.com” or anything your domain name ends with.

And for our example that means you would configure the plugin like this:

  • Request: /old-page
  • Destination: /new-page

add 301 redirects to wordpress

While you can use the full URL using only the portion relative to the root is an efficient way to do it. After that click on Save Changes.

Anyone visiting the old URL will be automatically redirected to the new URL.

Using Wildcards for More Complex 301 Redirects

Wildcards are a more advanced feature that allows you to dynamically redirect multiple pages to one or more associated pages.

For example, let’s say you have a whole category of posts like- yourdomain.com/travel/POST-SLUG

You have 10 posts in the travel category all using that same URL category slug.

Now, let’s say you wish to change the category slug to “adventure”. You want all of those 10 posts to have the new URL of:

yourdomain.com/adventure/POST-SLUG

You can use wildcards for automatically handling the process for you rather than going through the exhausting process of manually redirecting every single post.

Generally, a wildcard represented by an asterisk * is any dynamic value entered in that part of the URL structure.

Let me go back to the example to show you how it works.

If you configure Simple 301 Redirects like shown below:

  • Request: /travel/*
  • Destination: /adventure/*
  • Check the Use Wildcards? box

add 301 redirects to wordpress

That configuration means that:

  • yourdomain.com/travel/vietnam gets redirected to yourdomain.com/adventure/vietnam
  • yourdomain.com/travel/thailand gets redirected to yourdomain.com/adventure/thailand

You can get more creative with wildcard redirects if you want. Here are some examples of the plugin’s documentation:

add 301 redirects to wordpress

Read More: 3 easy Steps to Create and Edit .htaccess File in WordPress

Adding 301 Redirects to WordPress via .htaccess

If you require to set up broader redirects like to redirect a whole domain to another domain or redirect traffic to SSL you can also implement 301 redirects using your .htaccess file.

For adding 301 redirects to your WordPress site connect to the root folder of your WordPress site using either FTP or cPanel File Manager tool. Then after look for the .htaccess file:

add 301 redirects to wordpress

It’s important to backup your existing .htaccess file before you make any changes to your Website. After you have backed up the current contents of your .htaccess file you can add 301 redirects to the top of the .htaccess file.

Below are some examples of the types of 301 redirects that you can implement:-

301 Redirect a Single Page using .htaccess

For redirecting a single page to another single page you can use:- Redirect 301 /old-url /new-url

Where each portion is the part of the URL that comes after your domain name same as with the Simple 301 Redirects plugin.

Setting Up 301 Redirects for Moving to SSL

If you recently set up SSL you should add 301 redirects for sending http traffic to https to get better security and to avoid duplicate content.

Just add the below code snippet:

RewriteEngine On

RewriteCond %{HTTPS} off

RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

301 Redirect an Entire Domain via .htaccess

In case you are moving your WordPress site to a new domain name the following code snippet will redirect every single page on your old domain to the exact same page on your new domain assuming you keep the same permalink structure:-

#Options +FollowSymLinks

RewriteEngine on

RewriteRule ^(.*)$ http://www.newdomain.com/$1 [R=301,L]

Just add this snippet to the .htaccess access file of your old domain name, not your new domain name. Just make sure to replace “newdomain.com” with your actual new domain name.

For WordPress Migration Service, Dial Toll-Free +1-888-738-0846.

Wrapping Things Up

301 redirects are an SEO best practice whenever you change the URL of any piece of content on your WordPress site.

For managing 301 redirects directly from your WordPress dashboard simple 301 Redirects is a good free plugin.

You can also move ahead with our article on Top 5 Free WordPress Helpdesk Plugin for Customer Support.

Alternatively, you can use .htaccess to manually 301 redirect all or part of your WordPress site. At last, we hope that this post helped you completely.

Thanks for visiting us. For more help on any other issues talk to our WordPress Support team to get instant advice & support, Dial +1-888-738-0846 (Toll-Free) to avail our WordPress security services.



Leave a Reply