Loading...

Knowledge Base

How To Do a 301 or 302 Redirect for Websites

A redirect allows you to make one website redirect to another website. For example, when mydomainA.com is accessed through a browser, you will automatically be routed to the website content for mydomainB.com. You can choose a 301 permanent redirect or a 302 temporary redirect.

NOTE

  • This guide is for Linux web hosting customers who use cPanel as their hosting manager. If you have Windows web hosting with Plesk as your hosting manager, click here for instructions on how to create a 301/302 redirect for your website.
  • If you do not have a web hosting with Crazy Domains, follow this guide and set up redirect with Premium DNS.  

What Is a 301 Redirect

A 301 Redirect is also known as a Permanent Redirect.

If you've relocated your website to a new address and want to direct your visitors to the new domain name, you should set up a 301 Redirect. This type of redirect signifies a permanent redirection from your old domain (point A) to the new one (point B). It's important because it informs search engines like Google about the change, ensuring they transfer ranking and value signals to the new URL. This way, your website's content will be correctly indexed under its new permanent home.

 

What Is a 302 Redirect

A 302 Redirect is also known as a Temporary Redirect.

When conducting significant maintenance or applying upgrades to your website and you need to temporarily redirect your visitors to another site, a 302 Redirect is the solution. This ensures visitors don't encounter error pages while your main website is undergoing maintenance. Search engines recognize this as a temporary redirection, keeping the original page's value without transferring the indexing to the redirected URL.

IMPORTANT.

The instructions herein will only work if the A record points to your hosting's IP or if your domain name has the following name servers:  

  • ns1.syrahost.com 
  • ns2.syrahost.com 

Know what your name servers are on this WHOIS page.

 

Creating a 301 or 302 Redirect in cPanel

Follow these steps on how to create a 301/302 Redirect through the cPanel hosting manager:

  1. Log in to your cPanel.
  2. Scroll down to the Domains section, click the [ v ] arrow symbol, and then click the Redirects icon.

    Screenshot of VD cPanel Redirects Icon

     
  3. Under Type, choose between Permanent (301) or Temporary (302) from the drop-down menu.

    Screenshot of VD cPanel Redirects type

     
    • A 301 Redirect is a permanent redirect. Major search engines recommend this option as it protects your brand, especially if you register domain names that are similar to yours. You can redirect them to your site to prevent cybersquatting.
    • A 302 Redirect is a temporary redirect. This is used when you want to temporarily redirect your page to another one. This option is ideal if you want to show your users and search engines that a page will be returning.

     
  4. Complete the following fields:

    Screenshot of VD cPanel Redirection Details
     
    https?://(www.)? Select the domain you wish to redirect to another URL. Select All Public Domains if you need all domain names connected to this hosting to be redirected to the same web page. 
    / Add path if necessary. For example, if you want to redirect test.com/shop, add the word shop for the path. Otherwise, leave this field blank if you only need to redirect your domain name.  
    Redirects to Add the destination URL where your domain needs to redirect to including the protocol like http://, https://, or ftp://, among others.
    www. redirection:

    Select how the www subdomain will be redirected:

    • Only redirect with www. - This redirection only applies to www subdomain of your domain name. When people access just your domain name without the www, they may be redirected to a different URL.  
    • Redirect with or without www. - When people type in your domain name with or without www, they will be shown with the same web page set up on this redirection.  
    • Do Not Redirect www. - When people type in www with your domain name, this redirection will not apply and they may be shown with a different web page or an error.  

    NOTE. Selecting **All Public Domains** automatically disables the www redirection. Add another redirection for www if this option is chosen.

  5. Click the Add button.

A similar screenshot like the one below shows when the redirect is added successfully.

 

 

 

Did you find this article helpful?

 
* Your feedback is too short

Loading...