How To Redirect URLs in WordPress

In order to maintain a good website, one has to keep certain factors in mind. One such factor is known as URL Redirects. URL Redirects are effective ways to redirect users from one page to another. Thus, you should know how to create redirects on any WordPress website.

Besides, you should also know its importance, use, and setup process. With its complete knowledge, the entire redirection process will be convenient. Today, we will be mentioning how to redirect URLs in WordPress. You can perform the process with or without the plugins. Hence, we will be elaborating on both methods.

After reading this post, you will get a piece of in-depth knowledge of URL direct, its use, types, etc. So, without any further ado, let’s begin.

What is a URL Redirect?

Before moving on to its process, let’s comprehend the concept of URL Redirect.
A URL redirect is used for sending both visitors or bots from a URL to another. For an elaborative explanation, let’s take an example. Suppose you have prepared content at one site. Now, you want to move it to another site.

In that case, a URL redirect can help. With this, a visitor will be automatically sent to the other URL if they visit the early URL. It’s pretty convenient and easy for both the owner and visitor. Besides, URL redirection is also a fantastic way to access the content without facing difficulty. It also prevents users from 404 error pages.

It’s not very welcoming when a user encounters such an error. It’s rather infuriating for the visitor. So, to render the best experience, websites should retain such pages. Having said that, we all know that SEO or Search Engine Optimization is an integral part of a website’s growth. Redirects are also quite necessary for SEO tactics. The combination of both can help in higher website rankings.

Wondering how? Let’s give it an explanation too. Suppose you have links from different sites to your site. In that case, redirects can get the perks of the links. Similarly, If you don’t add the redirects, there will be no benefits of the links when the URL gets changed. It is efficient for retaining the authority for the new URL.

What’s the Use of URL Redirects?

URL redirects have different uses in today’s time. That’s why most website owners comprehend the redirection process in brief. Let’s take a look into some of the benefits of URL redirects mentioned below.

Fixing Any Broken Content:
As mentioned earlier, visitors do not like broken content. If the website is related to any business, this can be a significant issue for the owner. It’s also a reason why visitors leave the website.

However, with URL redirects, you can prevent such scenarios. That’s because, with these URL redirects, the visitor will be transferred to the content without any issue.

Changing the Domain Name of the Site:
One may require to change the WordPress site’s domain name during site migration. Having said that, URL redirects can be used. With this, the visitors from the old domain will be migrated to the new one quickly.

Changing any particular piece of URL:
URL redirects are also quite efficient for changing a piece of content URL. Once a URL or page on a WordPress site is changed, a redirect can be utilized. This will prevent any 404 errors and better search engine optimization.

Moving From HTTP to HTTPS:
Redirects can also be used to ensure the users utilize HTTPS. It is best for users as they get the assurance of using secure HTTPS rather than HTTP. It is most convenient when an SSL or TLS certificate is installed.

Making Pretty Links:
Besides, redirects are also perfect for making good internal links and external links within the website. Affiliate websites are pretty renowned for using redirects as an effective strategy.

Forcing www or non-www
Redirects can also be used to ensure that visitors use the www version or non-www version. It’s suitable if you prefer or do not prefer www on the website URL.

Types of URL Redirects

Now that you have an elaborative idea regarding URL redirects and their use, let’s move on to their types. While 301 and 302 are pretty prevalent, you will also get other URL redirects. Here’s a quick glimpse of the same

301 Moved Permanently
The above-mentioned implies this is a permanent redirect. It is a prevalent redirect and also quite necessary for SEO. This entire code signifies that the content mentioned in the question is not present in the original URL. It is transferred permanently to the new URL.

It’s pretty clear from the code name itself. With this URL redirect, one can pass the control from the current or actual URL to the new ones.

302 Found (Temporary Redirect)
Again, as the code text signifies, this redirect is temporary. It means that the content is present in the actual URL. However, it’s being sent to another page on a temporary basis. 302 Found (Temporary Redirect) is not so commonly used. It is suitable for maintenance, A/B testing, and geotargeting. The code is not utilized for SEO purposes.

303 See Other
303 see other is just like 302 redirects. One way by which anyone can differentiate is that 303 See Other retains users from submitting information multiple times. After submitting once, you do not have to submit again.

The code is efficient for stopping the user browser from making PUT requests. It then directs to utilize GET for successive requests.

307 Temporary Redirect
This redirect is the same as 302 and 303 redirects. However, they are different from each other in terms of technicality. 307 attains the same tactic of sending and getting information. On the other hand, 303 has two tactics.

308 Permanent Redirect
308 Permanent Redirect is the same as the 301 redirects. Again, they differ from each other in technical details. While a 308 redirect can use POST, 301 redirects can be changed from POST to GET.

3 Best WordPress Redirect Plugins [With Methods]

We all want the best for us. And that goes for WordPress Redirect Plugins too. There are numerous WordPress Redirect plugins from which you can choose.
These are pretty efficient, convenient, and useful. Here is a list of some well-known plugins that can assist you in making WordPress Redirects with its methods

 

Redirection

One of the most renowned WordPress Redirects plugins of today’s time is redirection. Being active on more than one million sites, Redirection is relatively popular among users. It holds various features for efficient upshots. These outstanding features make it worthwhile for use in most situations.
To mention its perk, the redirection has the ability to set up redirects on changing a URL within the site automatically. It further assists you in utilizing Regex for setting up complex redirect types.
The renowned plugins have been thoroughly used and reviewed by users around the world. It’s also a convenient way to add and manage redirects.

Here’s how you can use it:

  • First, complete the activation and installation process of the plugin.
  • Go to Tools> Redirection. Initiate the setup process for the redirects.

The WordPress redirects plugin can also be used to check 404-page errors.

Safe Redirect Manager

Safe Redirect Manager is a product of one of the finest WordPress development agencies called 10up. It is a 5-star plugin with a distinctive approach to performance. With five levels, this plugin is efficient for all. The 300 level code is for redirects. It is also helpful for 404 code signifying page errors.
The Safe Direct Manager is convenient for managing 300 codes. Besides its outstanding working ability, the plugin is easy to set up as well. You can make your own status code with the help of developer filters. It can also be utilized for setting up broader redirects or one-off redirects. Now, make sure to input the URL that needs to be directed, the destination URL, and the status code. And that’s it. Your work will be done in a hassle-free manner.

301 Redirects

301 Redirects is one of the most recommended plugins for its effortless user interface. Developers are well-familiar with the regular updates concerning security purposes. It provides redirects to a WordPress site. Besides, it is also efficient for handling page migration from websites with no WordPress. That’s helpful because, in this case, the URL does not stay preserved.   301 Redirects has a bulk upload add-on to manage numerous redirects. It helps to make a CSV file of old URLs for importing to create new URLs. The add-on is efficient for checking duplicate URLs.
However, please do not fall for its name. The plugin helps in making other redirects like 302 and 307.

Here’s how it can be used

  • After successfully installing and activating the provided plugin, go to Settings and then 301 Redirects.
  • On doing so, you will note three options. Select the redirect type, which might be set to 301 by default.
  • Within the Redirect form, input the URL that has to be redirected.
  • Similarly, in the redirect to the field, you can select the location where visitors should be redirected.
  • After inputting all the information and details, click on Save. For additional redirects, repeat the entire process.

How to Use Redirect WordPress URL with .htaccess?

If you are looking for a process without plugins, then this tactic is quite effective. It is operated from the backend of the website. However, it’s recommended to backup before moving to other steps. To use .htaccess for redirection of WordPress URL, follow the steps that are mentioned below.

Step 1: Go to the hosting’s cPanel and then click on “Files’. After that, click on “File Manager.”

Step 2: Once a popup appears, go to “Document Root for” and then select the domain. Make sure to choose the check option for “Show Hidden Files.” Click on “Go.”

Step 3: You will see a window with all the files of the site. Right-click on the .htaccess file and choose the “Edit” option.

In case you do not find the .htaccess file, make sure to make one. For that, click on “New file” and name it to .htaccess.

Step 4: Within the .htaccess editor, copy and paste “Redirect 301 /oldpage /newpage”. This will help in permanent or 301 redirects.

In place of /oldpage enter the URL where you want to be redirected. Similarly, for /newpage, enter the URL path that comes in the old URL path.

Make sure not to enter a complete URL if you are redirecting to the same domain. It’s only necessary if you are shifting to another domain.

This method is quite preferred of all. While it can be a bit complex, with the blend of the different tips on how to secure WordPress without Plugins, one can successfully try it for redirection. With that being said, there are other ways to make a URL redirect in WordPress. Check out the next section to know more.

Other Ways to Make a URL Redirect in WordPress

There are numerous plugins to create a URL Redirect in WordPress. These are helpful and appropriate for the users. Let’s take a look into it to know more.

With cPanel Hosting

To use cPanel Hosting for making a URL redirect, follow the steps that are mentioned below.

Step 1: Go to the hosting’s cPanel and then “Domains.” After that, click on “Redirects.”

Step 2: Move to the “Type” drop-down box and choose the redirection preferred by you. Make sure to select as per the link you want to redirect to. It can either be permanent, i.e., 301, and temporary, i.e., 302.

Step 3: In this step, choose both the domain and present page address from the second drop-down menu.

Step 4: Lastly, enter the webpage address where the visitors will be redirected to. Click on the “Add” button.

 

With MyKinsta

You can also use MyKinsta for the same. Here’s how you can do so

Step 1: Log in with credentials for Kinsta and then click the website.

Step 2: Now, click on the “Redirects.” Select “Add redirect rule.”

Step 3: Once you see a popup, make sure to input the choices. Start by adding the domain, old page, and new page, respectively.

Step 4: Select the Redirect type. You can choose from 301 and 302. Press “Add Redirect Rule.”

 

With SiteGround

If your site is hosted on SiteGround, follow the below steps for redirection.

Step 1: First, Go to SiteGround and then “Websites.” Once done, choose a site.

Step 2: After that, move to “Site Tools,” “Domain,” and then “Redirects.”

Step 3: Provide both the path and redirect type. After that, click the “Create” button.

 

With Cloudflare

Websites that use Cloudflare can follow the steps provided below.

Step 1: Go to the homepage. Click on the domain where you want to redirect the links.

Step 2: Go to “Page Rules” and click on the tabs. Press the “Create Page Rule” option.

Step 3: Once you see a popup, input the preferred URL. Then go to the settings, and select the “Forwarding URL” button. Choose from 301 or 302 as per the preferences. Input the destination URL.

What is the Setup Process for Server-Level Redirects?

Apart from other relevant resources for developers, redirects are surely important. You can encounter a situation where it’s required to set up server-level redirects. Here are some common cases with the process mentioned below

HTTP to HTTPS: (With Process)
The traffic can be redirected to the HTTPS version requested by the user. For this, you can use the .htaccess method. Make sure to input the snippet provided below.

RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301,NE]
Header always set Content

non-www to www/www to non-www: (With Process)

The traffic will be redirected to either www or non-www as requested by the user. For this redirect, you can use the site’s .htaccess file.

www to non-www
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www.yoursite.com [NC]
RewriteRule ^(.*)$ https://yoursite.com/$1 [L,R=301]

non-www to www
RewriteEngine On
RewriteCond%{HTTP_HOST} ^yoursite.com [NC]
RewriteRule ^(.*)$ https://www.yoursite.com/$1 [L,R=301,NC]

Changing domain names: (With process)
The traffic will be redirected from the old domain to the same content on the new domain. For this process, enter the given .htaccess rule to your old site’s .htaccess file.

#Options +FollowSymLinks
RewriteEngine on
RewriteRule (.*) https://newsite.com/$1 [R=301,L]

To sum up, you can do so with or without plugins. Make sure to select a process as per your own preferences. Hopefully, you got a clear idea regarding the entire process. If this read seems informative to you, make sure to check out our other articles as well.

Navkiran Dhaliwal

Navkiran Dhaliwal

Navkiran is an experienced technical writer with 10+ years of industry experience. Her writing skills and technical knowledge may be confirmed by reputed clients all over the world.

Create beautiful blurbs with Divi Flip Cards

Let’s celebrate! We have a sweet deal for you! You can get the best flip box plugin for Divi with a 10% discount! Use the coupon code DFC10 at checkout!

0 Comments

Submit a Comment

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

Sign up to our newsletter list

Pin It on Pinterest

This site uses Cookies to improve your online experience. By continuing to use this site without changing your cookie preferences we will assume that you are agreeing to our use of cookies. For more information visit ourPrivacy Policy.
Understood