A complete reference to learn and create Different types of redirects

Table of Contents

An overview

An URL redirection or URL forwarding is a method that is used to make a page available to another URL/URL’s. When an end user attempts to open a webpage, the browser tries to retrieve and available it to the user. In case, it is not available or it is redirected then the browser opens the redirected page.

Similarly, domain redirection or domain forwarding is the process when entire pages of a website redirected to another domain. The end user may not know how this process worked but it is a good practice for the site owner. In this article, I will cover most of your questions about redirects in details. Also, I will help you know how you can use redirects in the easiest possible way.

Need of redirects

As any SEO knows, the redirect is a very important process when a web page or an entire web page is moved to a new location. A redirect can be beneficial in many ways and also fulfill the purpose of a good SEO website. Let’s discuss some of the most asked questions as below.

So, what to expect on the old domain or on old page?

What is the purpose of using the redirect?

Why is it necessary to move a domain to a new location?

Matching domains

Many times users mistype a website.
e.g. facebook.com and facebok.com

Organizations are aware of the typing issue by the end user and that is why they register such domains and redirect to a single domain.

Moving to a new domain

This is also one of the common issues and achieved by the redirects.
Assume a website owner may feel like s/he needs to change the domain name for some reasons. Or two websites need to be merged together to form one website.

Likewise, there are many such situations that can be resolved by using the redirects. Let’s talk about the different types of redirects are available to use.

Redirect illustration

What is a 301 redirect?

A 301 redirect or moved permanently redirect is one of the commonly used redirect by many webmasters. The purpose of using this redirect is to let the browser know about the permanent URL redirection to a brand new location.

Technically, when a redirect is used, a current link or a record produces a response that it should be updated to a new record or a new link.

301 redirect is known as a best practice when a website is upgraded from HTTP to HTTPS.

How to use 301 redirects?

If you want to use 301 redirects for any of your websites, you need to first create and store a .htaccess file in your root directory. If there is already one exists, you just need to edit a bit of code.

Suppose, you are moving: www.oldsite.com to www.newsite.com
Redirect permanent http://www.newsite.com

If you are just moving one single web page, you can add the code mentioned below to your .htaccess file.

Redirect permanent /abc/xyz.html /newspot/xyz.html

301 redirect is used to make a domain or a webpage move permanently to a new location. The best part is 301 redirect is free from search engines penalties.

What is a 302 redirect?

A 302 redirect means the web page or domain has been moved to a new location but the timeframe would not be permanent. A 302 redirect or moved temporarily redirect, is not much in use like 301 redirects but it has its own importance.

Assume a website is in need of some upgrade or going through some technical phase of the coding change of server, etc,

Instead of having downtime for a website, it can move temporarily to a new location until the problem is resolved. The new location can be its duplicate website that can be accessed through the browser to end user.

How to use 302 redirects?

If you want to use 302 redirects, you should have one .HTACCESS file to your root folder. You can login via FTP to your root folder and check for the same if there is an .HTACCESS file already exists. If you don’t find one you need to add one.

Now, you need to open the .HTACCESS file and add the below line to it.

302 /onepage.php http://abc.com/twopage.php

Now, you need to save and upload this file to your root folder. You can examine by opening old URL to find whether you have done correctly or not.

http://abc.com/onepage.php

What is a 307 redirect?

A 307 redirect is having all the features of a forwarding address. It has a little different approach when it comes to redirecting URL and an almost similar to 302 redirects.

Although the content has been relocated to a new location by using a redirect, when web page a.php is indexed, 302 redirect promotes the search engines to continuously index a.php instead of b.php. The page b.php is temporary and the page a.php will be of use after a certain timeframe. All of the website factors will stay with the forwarding URL. The basic use of 307 redirects is relocating pages for website maintenance.

Things to remember:

  1. Make sure you have a valid .HTACCESS file to your root directory. If you don’t have one, create one and place it in the root directory of the desired domain.
  2. When you edit or create an .HTACCESS file, you need to ensure that the transfer is in ASCII and not binary.

What is a 404 redirect?

A 404 not found error redirect simply means the web page is not available on the server. A 404 also can be used to redirect by the website owner depending on the situation. The simple HTTP 404 not found error will show you a white screen with black text. It is possible that the page is removed or deleted by the server or the URL has been changed permanently.

404 redirect can have many variants as it suits the demands of nature.

  • 404 not found
  • 404 error
  • The requested URL was not found on the server.
  • HTTP 404 not found
  • 404 Page not found
404 error

Fixing 404 Error

There is a simple guide one can use to solve the 404 error without a hassle. You need to follow these simple yet easy tips that can solve the problem quickly.

Refresh the page

Refreshing the page can be a good choice to check if the page really has a 404 error or not. This could be one of the reasons that page has not loaded correctly or there was downtime on the server or it is because the request was timed out. You can do it simply by clicking the F5 button on your windows pc or Command + r button on your mac.

Clear cookies and cache

It may happen that the same web page is able to load from another browser or device. In this case, you need to clear the caches and cookies from your browser.

Check for correct URL

This can be one of the reasons that you have made a typing mistake and see the 404 error. Check for the correct spellings, extension, and slashes, etc,

Scan for malicious data

If a computer system has malware it may force a few particular websites from open. Instead, it shows a 404 error message like the web page is not available. You need to double check if there is no malicious data on your system and it is not compromised.

How to create redirects using WordPress plugins

If you find it hard to edit the codes of .HTACCESS file, you have another good option to use simple plugins. These plugins can make the same task lot easier to do. It also helps you to set up redirects without even writing a line of code.

Redirect wordpress plugin

Redirection

The redirection plugin can help setting up various redirects to a WordPress site. This is the best and suitable plugin that is easy to add and manage for redirects need.

You just simply need to install and activate the plugin. After activation, you can go to tools menu and then under redirection to set up the redirects.

It helps you set up various redirects depending on your needs and also identifies 404 errors available on your website.

Page Links To

The Page Links To plugin has a different approach to redirect. It helps WordPress post and pages to be redirected to another page and post. Yes, the concept is same but it only deals for this purpose only. This is what it deals more comfortably and gives a precise result with a redirect.

You can simply add the plugin and add a meta box to the post. Now, here you can enter the new address or the new location where you want the audience to go.

Summary

A user needs to make sure the basic configuration file .HTACCESS is the best way to set up redirects. However, a small mistake may change the entire website functioning or sometimes lead to inaccessibility.

It is very important to know to keep a backup of the original .HTACCESS file before you make any necessary changes. Although, this write-up was easy enough to play with the codes but you can use plugins as a secondary solution.

To get 2 months free WordPress Hosting

Fill up the following form and we will send the coupon code and order link within 5 minutes to your email.

Want to Try our Premium Wordpress Hosting?Its Absolutely Free for First 2 months!