How to redirect URL

How to Redirect URLs in WordPress: A Comprehensive Guide for Beginners

When you have a new website, URL redirection may seem not that important. Because a fresh website has only a few pages to deal with. But over time your site grows and more pages are added. And, more pages means more URL to manage.

Suppose, a URL isn’t performing as much as you expect, or, later you realize that URL is too complex to remember. So, how would you deal with this situation?

In that case, you may need to upgrade or redesign your site which is why you’re bound to shut down your site temporarily. Having said that shutting down a website for a while is too risky to maintain the flow of traffic.

To handle all these situations, a vivid knowledge on how to redirect URL can rescue you. How? Well, keep reading the blog. You’ll get everything about the topic.

What Is URL Redirect in WordPress

How to redirect URL

An URL redirect means you set a new destination for the old URL. That means you’re remapping your web pages. When you redirect a URL, you’re simply forwarding it to another address on the same, or different domain.

It ensures visitors don’t end up on a 404 page and instead find something relevant to what they were originally looking for.

And, it keeps you from losing the value of any links you’ve built to that page. That is important for search engine optimization  (SEO), as well as the user experience of anyone who clicks one of those links. 

Why & When Do I Need to Create a Redirect URLs

When Do I Need to Create a Redirect URL

To be very honest, creating a URL redirection doesn’t need any auspicious reason. You can create it anytime you wish to.

However, we have listed the top 5 points when you might be thinking to create a URL redirection. So, whenever you’re in any of these below-mentioned situations, you can redirect the URL so that you won’t be losing your audience by giving them a 404 error page.

  • Having Duplicate Content: Multiple posts that contain the same content can negatively impact SEO. Search engines can’t decide which URL is the correct one and which one to rank on the SERP.
  • Managing Multiple Domains: Instead of using multiple domains to display the same page, you can instead redirect them to the main one.
  • Moving to a New Domain: Suppose, you have a domain name “mywebsite.com”. Now you want to change it because you think it isn’t that attractive for anyone to remember. Or, you are threatened with legal action because your domain name infringed on someone else’s copyright.
  • Simplifying and Tracking Display Ads: If you are advertising with banner ads, you might want to track the ads’ responses. You can accomplish this by using specific URLs that you include in your advertisements. Then, with a simple redirect, you can send the traffic from that specific URL to the homepage or any of the pages on your site.

Types of Redirect That You Need to Know

Types of redirect

There are a few types of URL redirection that people often use. The most commonly used redirects are 301 Moved Permanently, 302 Found, 307 Temporary Redirect, and Meta Refresh.

301 Moved Permanently: This is known as a permanent redirect and is used to indicate to search engines that the originating URL has permanently moved to a new URL. From an SEO perspective, link juice is passed via a 301 redirect.

302 Found: 303 redirect is like, what you’re searching for isn’t available right now. But it will be available certainly after a certain time. A 302 redirect was originally used for temporary redirects (in the HTTP 1.0 specifications). It is still used extensively for temporary redirects, but a 307 redirect should be used instead.

307 Temporary Redirect: A 307 redirect is used for when you’re redesigning your site, but want to direct users to a different domain while you finish. Or, if you want to A/B test two different versions of a page, before committing to a new version. A 307 redirect doesn’t pass link juice.

Meta Refresh: It’s a type of redirect executed on the page level rather than the server level. This is most commonly associated with a five-second countdown with the text “If you are not redirected in five seconds, click here.” Meta refreshes do pass some link equity but are not recommended as an SEO tactic due to poor usability and the loss of link equity pass

How to Redirect URLs in WordPress (Without Plugins)

How to redirect URL without plugin

Redirecting a URL in WordPress can be done without using a plugin. Yeah, that’s right. You can create URL redirection using cPanel and .htaccess files. So, let’s get started with “Using cPanel” which is arguably the easiest way to redirect a URL.

Method 01: Using cPanel 

When signed into your cPanel account, scroll down to the Domains section. Scroll down and find the Redirects icon, as shown in the photo. Then, click on it.

Redirects icon
  • In the dropdown menu under Type, you can choose between Permanent (301) or Temporary (302). Make your selection. We recommend keeping the field Type as Permanent (301).
  • Afterward, select the domain name you wish to redirect to outside. For instance, http://mysamplewebsite.com/specificpage.html is our source URL.
  • Under Redirects to, place the details of the destination URL. For example, we will redirect to http://www.anotherwebsite.com/.
  • Click Add, and the URL redirect is done! The source URL will redirect to another URL.
Add redirects

Congratulations! You have done all the procedures to redirect a URL in WordPress site.

Method 02: Using .htaccess File

As you know .htaccess is one of the most vital files of a WordPress website, it mainly handles the redirects. So, access the .htaccess file with care.

  • As always, you need to log in to your cPanel account and open the file manager from the Files section, it consists of all the core files and folders of your WordPress site.
File manager
  • Find out public_html from the left vertical navigation menu and click that file. 
  • Search for the .htaccess file. As you can see, .htaccess has a dot prefix, which reflects its nature to be a hidden file. 
Note: If it happens you couldn’t find the .htaccess file, chances are that it is hidden. To display the hidden file, click on the Settings button at the top right corner of the screen. A dialog box will pop open as soon as you click the button. In the box, check Show hidden dotfiles and click Save.
Find htaccess file
  • Once you find it, download that file to your computer.
Note: This step is incredibly important. Like I said, .htaccess is the configuration file for your whole server, so you don’t want to make a mistake. That’s why you should always keep a copy of your original .htaccess file. That way, if anything goes wrong you can just re-upload the original file.
So, before making the changes in the next section, make a copy of the .htaccess file you downloaded from your site and keep the original file safe, secure, and unedited.
  • Open your .htaccess file and edit it as following;
  • To redirect a single post or page, add the following short snippet for each post or page you want to redirect:
Redirect 301 /old-url https://yourdomain.com/new-url

Where /old-url is only the part that comes after yourdomain.com. For the new URL, you should input the full URL, though.

  • To redirect the whole domain to another URL, add following code:
Redirect 301 / http://www.mynewdomain.com/
  • And last, to redirect one file to another file, locally, in the same domain, add the following code:
Redirect 301 /old/path/oldpage.html http://www.currentdomain.com/new/path/newpage.html

Once you are completed with the .htaccess file editing, upload it to the server. For uploading the file, make sure you have FTP access to the server.

Top WordPress Redirect Plugins to Redirect URLs

Redirect plugin

For basic users and non-developers, setting up a working redirection path can be quite tricky. That’s why the easiest way to go about it is by using a plugin.

When you install a WordPress redirection plugin, you can simply manually type in which page or website you want to redirect your users to with no coding knowledge necessary.

These are the top-rated WordPress plugins for URL redirection.

  1. Redirection
  2. WP 404 Auto Redirect to Similar Post
  3. SEO Redirection Plugin
  4. Easy HTTPS redirection plugin
  5. All 404 Redirect to Homepage

Redirection

How to Redirect URLs in WordPress: A Comprehensive Guide for Beginners 7

Redirection is the first pick on our list. It’s a 4-star plugin that has more than one million active installations. With it you can easily manage 301 redirections, keep track of 404 errors, and generally tidy up any loose ends your site may have. This can help reduce errors and improve your site ranking.

Redirection creates a manager page where all issues are listed and can be acted upon. Its settings also allow you to specify who has access to the plugin and what browsers to include or exclude.

301 Redirects – Easy Redirect Manager

How to Redirect URLs in WordPress: A Comprehensive Guide for Beginners 8

As an all-around solution for all problems related to redirecting in WordPress, 301 Redirects is definitely one of the best plugins for redirection. Even if you have never done redirection and you don’t even know where to start, you’ll be able to easily set up a redirection path only a couple of seconds after activating it.

With over 100K+ active downloads, 301 Redirects is one of the most popular WordPress redirection plugins. It also has a high rating of 4.5/5 stars.

SEO Redirection Plugin

How to Redirect URLs in WordPress: A Comprehensive Guide for Beginners 9

SEO Redirection is also one of the simplest ways of setting up and managing your redirects. It’s especially good if you’re thinking about using redirection to boost your SEO, because it also fixes crawl errors in the Google Search Console, helping your search engine rankings along the way.

It’s a 4 star rated plugin that has already 40K+ active installations. The number of active users is showing how well it’s working on their site.

Easy HTTPS Redirection Plugin

How to Redirect URLs in WordPress: A Comprehensive Guide for Beginners 10

Easy HTTP Redirection plugin doesn’t deal with 404 error pages redirection, but it makes sure that all of your visitors are going to the HTTPS version of your website. Of course, in order for it to work, you will need to have a working SSL certificate.

After you install and activate the plugin, all visitors who try to access an HTTP version of your WordPress site will be automatically directed to HTTPS. This can do wonders for your SEO because search engines favor sites that are SSL-encrypted.

All 404 Redirect to Homepage

How to Redirect URLs in WordPress: A Comprehensive Guide for Beginners 11

If your goal is to redirect all of your 404 error pages to your homepage, All 404 Redirect to Homepage is the plugin to do it. However, you will not have the same options available as in some of the other plugins, since this one is designed specifically for that.

But, if you want to redirect to your homepage exclusively and use redirection only as a means of managing 404 error pages, this is the simplest and easiest way to do that.

Bonus: Common Challenges You May Face While Redirecting URLs

How to Redirect URLs in WordPress: A Comprehensive Guide for Beginners 12

While redirecting a URL in your WordPress site, you may face some common problems. Don’t be panicked as it can be solved in moments. Let’s talk about some of those common problems that people face very often while redirecting a URL.

Multiple Redirects

Suppose, your page was originally at URL A, then moved to URL B, so you put a redirect in place to send any traffic and link juice that was going to URL A to URL B. Then somewhere down the road the decision is made to move to URL C.

So, you redirect the page from URL A to URL C.

This is a mistake that many people commit. Don’t do that rather than you should redirect the page from URL A to URL B, then URL B to URL C. This is the best practice.

Using 302 Redirects Rather Than 301 Redirects

A 302 redirect sends users and search engines to the new URL, but don’t pass the link juice or page equity to the new URL.

A 301 redirect sends everyone to the new URL and passes some of the link equity to the new URL. If you’re using 302’s from a page that’s never coming back, you’re not taking full advantage of what you’ve already built up for that page.

Infinite Redirects

Infinite redirect is like the page redirects to itself, or in some cases redirects to another page, which then redirects back to the original page, and so on. The browser will take a couple of moments, then show the error. 

The best way to identify infinite redirects is to look in the crawl errors section of Google Webmaster Tools where they’ll tell you all of the issues they’ve encountered while attempting to crawl your site.

Conclusion

Setting up a URL redirection may seem intimidating for the non-technical person. But no worries! Following this guide you can redirect a URL anytime, it doesn’t matter whether you not know to code.

Having said that if you fall into any problematic situation while redirecting a URL to your WordPress site, you can let us know. We’d love to assist you.

shams

Shams is a technology enthusiastic person who loves to write WordPress related content. In his free time, he loves to watch movies and sports. He has a keen interest in traveling all around the world.

About the Author

shams

Shams is a technology enthusiastic person who loves to write WordPress related content. In his free time, he loves to watch movies and sports. He has a keen interest in traveling all around the world.

Join over 5,000 subscribers on our newsletter to get the latest WordPress updates, news, in-depth reviews along with occasional tips on building better WordPress sites.

Looking for WordPress plugin or theme recommendations? Or research based WordPress articles?

4 thoughts on “How to Redirect URLs in WordPress: A Comprehensive Guide for Beginners”

  1. I don’t even know the way I stopped up here, however I believed this publish was once great.
    I do not know who you might be but certainly you’re going to a famous blogger when you
    aren’t already. Cheers!

Leave a Reply

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