How to Put a Stop to WordPress Trackback Spam
March 27, 2015
Best 4 WordPress themes in March 2015
April 1, 2015

Beginner’s Guide to Creating Redirects in WordPress

Are you trying to create a redirect in WordPress? Not sure what is a redirect and why is it important? Don’t worry, we have got you covered in this beginner’s guide to WordPress redirects where we will cover what is a redirect, how to create a redirect in WordPress, when is the good time and why do you need.

Ready? Let’s get started.

Website Redirects

What is a Redirect in WordPress?

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

There are various different types of redirects such as 301 redirect, 302 redirect, 307 redirect, etc.

We will only cover 301 redirects as that’s the most important to keep this article simple and useful.

Let’s take a look at why it is important by understanding the use case.

When do you need a 301 redirect in WordPress?

The primary reason to use 301 redirects is when your site or a page on your site has been moved, and you want to point the user to a new page instead.

When one of our readers asked us for a way to redirect users from an old post to a new post is the time this article idea came to us.

– You need to create a redirect when you are planning on deleting a post or page in favor of new content.

– You need to create a redirect when you are planning on changing the permalinks of your post or page.

Why? Because not creating a redirect will cause your users to see a 404 not found error. It can also impact your site’s SEO and hurt your search engine rankings, which is not only bad for users.

That’s when 301 redirects become very important.

It allows you to tell search engines and your user’s browser that the page they are trying to reach has been permanently moved to a new location.

This allows for all your old page’s traffic and backlink (SEO) strengths to be transferred on to the new page.

Now that we have covered the why and when of redirects, let’s take a look at how you can create 301 redirects in WordPress using the different methods that are available.

How to Create Redirects in WordPress (using Plugins)

By using one of the many WordPress redirect plugins an easier approach to create and manage 301 redirects. This allows you to setup redirects without ever writing a single line of code.

1. Redirection

By using the Redirection plugin is the simplest way to add and manage redirects in WordPress. Install and activate the plugin. Once activated, visit Tools » Redirection to setup your redirects.

Setting up WordPress redirects using Redirection plugin

Redirection plugin not only allows you to setup redirects, it also helps you find out 404 errors on your WordPress site. You can then redirect those URLs to an appropriate destination.

2. Page Links to

Sometimes you may want to keep a post/page, but redirect it to another post or page. This is where Page Links to comes in handy. This simple plugin adds a meta box on your post edit screen where you can enter the address of the new location where you want to send your users.

Adding redirect link in post editor

Adding redirect link in post editor

3. Simple 301 Redirects

Another easy to use plugin is Simple 301 Redirects. As the name suggests, it makes 301 Redirects simple. Simply install and activate the plugin and then visit Settings » 301 Redirects to add your URLs.

Adding redirects using Simple 301 Redirects plugin for WordPress

Now while setting up 301 redirects using a WordPress plugin is easy, it has some minor performance setback. Your WordPress redirects maybe a bit slower by some microseconds, based on your WordPress hosting provider.

If you want to make your redirects faster, then you can do so by using the code method and .htaccess file.

Setting Up 301 Redirects in WordPress using .htaccess

Using the web server configuration file .htaccess, WordPress users can set up 301 redirects that are fast.

Please keep in mind that a small mistake in your .htaccess code can make your WordPress site inaccessible, and it may start showing Internal Server Error.

That’s why it is important that you backup your .htaccess file before making any changes.

To edit your .htaccess file, you will need to connect to your website using an FTP client. The .htaccess file resides in your WordPress site’s root directory.

If you can’t see your .htaccess file there, then you need to force your FTP client to show hidden files. (See why you can’t find .htaccess file on your WordPress site.)

You can edit .htaccess file in any plain text editor like Notepad.

Here is a simple redirect, where we are trying to send a user visiting an old post to a new post.

1 RewriteEngine On
2 Redirect 301 /a-very-old-post/ http://yoursite.com/a-very-new-post/

You can add the code above preferably at the end of your .htaccess file.

That’s all we hope this beginner’s guide to creating WordPress redirects helped you setup redirects on your site.

You may also want to check out these 9 most useful .htaccess tricks for WordPress.

putracode
putracode
Welcome to Wordpress Mind! We aim to be a source of quality information free WordPress themes for WordPress lovers all around the world.

1 Comment

  1. Rajat says:

    Good Day I Am So Happy I Found Your Website, I
    Found You By Mistake, While I Was Searching On Aol For
    Something Else, Anyhow I Am Here Now And Would Just Like To Say Many Thanks For
    A Remarkable Post And An All Round Entertaining Blog
    (I Also Love The Theme/Design), I Don’t Have Time To Read It
    All At The Moment But I Have Book-Marked It
    And Also Added In Your RSS Feeds, So When I Have Time I Will Be Back To Read More,
    Please Do Keep Up The Fantastic Job.

Leave a Reply

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

CAPTCHA HERE * Time limit is exhausted. Please reload the CAPTCHA.