How to Redirect Domain in cPanel

What is domain redirection in cpanel ?

     Redirecting domain name to another domain means that, Whenever you type a domainnameAAA.com in a browser, the user will be redirected to another website like domainnameBBB.com

Brief info about Website Redirection:

Website redirection is also known as URL redirection or URL forwarding. It is a world wide web technique for creating a webpage available under more than one URL. Once a web browser makes an attempt to open a URL that has been redirected, a page with a different URL will be opened. URL redirection service isn't new. In recent years it has become very popular. Website redirection service simply forwards one URL to another, normally in a different domain.

When a website visitor is redirected to a freshly named website domain, the web site address acquires a brand new URL. Businesses typically transform their website’s original home page into a redirect page. In website redirection a meta refresh tag is being embedded into the website’s source code. Without a redirect, regular site visitors will receive a 404 - Not Found error message.

cPanel is one of the simplest tool once it involves managing a web hosting account. HostingRaja hosting plans comes with a pre-installed cPanel. It makes it easier for our clients to control their website through a single hosting cPanel account. cPanel is one of the best techniques to organise the web site within the most effective method.

When to Redirect domain?

Assume that, you run a company ABCDServices.in and due to some reason, you have changed your company name to 1234 Services.in, then all your customers will visit your website and you don't want to lose your customers or business. So, then in this case, you can redirect your old website to a new website. So that you can retain your online brand identity.

 

Steps to redirect add addon/sub to primary domain in latest version cPanel

Step 1:  Login to cpanel.

 

Step 2: On the domain section, check the redirect option.







Step 3:  Choose the type of option Permanent or Temporary

 

Permanent (301):  This is permanent redirection, you have to be very careful in using this. It has lots of advantages in SEO. When you use 301 redirection means, you are informing everyone that, It is a permanent redirection to a new location. So browser or search engines will not come to the old address next time, Instead they will choose your newly redirected website URLs.

Temporary (302):  This is a temporary url redirection, means that, It is just for temporary purpose and not a permanent one. For example, When you develop a new website and during the deployment time, You dont want to lose any business. So in this case, you can use 302 redirect all your customers to my-new-website.com and complete the server update in your old website and remove the redirection.

 

Step 4: https?://(www.)?






Drop down this, select the domain from which addon / subdomain want to redirect to another domain .

    Step 5: Enter the path where you want to redirect in form this domain

Assume that if you give the particular file path, if visitor or customer access that particular file it automatically gets redirected to that domain as mentioned below.  

  Step 6: Providing domain name

 Provide a full  URL where you want to redirect.

For example : http://example.com  or https://example.in



Step 7: Redirect with or without www.

In most of the cases, you need to choose the “Redirect with or without www”.

Step 8: Wild Card Redirect




If you want to redirect all the files or all the URLs in the website, then you have to tick the above option.

Note:

Checking the Wild Card Redirect Box will redirect all files within a directory to the same filename in the redirected directory. You cannot use a WildCard Redirect to redirect your main domain to a different directory on your site.

 

Step 9: Click ADD to redirect

How to redirect website to https (SSL connections) in windows Plesk?


Please refer the below steps to redirect website to https in Windows Plesk.


Step 1:  Login to Plesk.


Step  2: Search for your domain name.


Step 3:  Under particular domain  Click on Hosting Settings.


Step 4: Under Security option, Select "SSL/TLS support" and "Permanent SEO-safe 301 redirect from HTTP to HTTPS" check boxes.

Enable SSL/TLS


Step 5: In Certificate tab select the SSL certificate for the website then scroll down and click on Ok.

Encryption enable

How to redirect from HTTP to HTTPS in WordPress, Magento, Opencart and Joomla?


What is HTTPS?

Https stands for Hyper Text Transfer Protocol Secure which means that all the data that you have shared with that particular website is secured and also ensures better data protection. An HTTPS establishes the secured link which is encrypted, the link is established between the web browser and the web server by using the secure socket layer i.e (SSL) or a (TLS). TLS is the latest version of SSL.


What is an SSL certificate?

If you want your website to be secured and encrypted then first you need to buy an SSL certificate. An SSL certificate is a small data file where it digitally binds a cryptographic key to an organization’s details. In other words, an SSL is a standard security protocol for establishing an encrypted link between a server and a web browser. Hence by using an SSL certificate, the data that is exchanged between the browser and the server remains secure.


Once after installing the SSL certificate and now if you want to access your domain name with HTTPS then follow the below steps:


HTTP to HTTPS Redirect

 

The HTTP to HTTPS redirect needs to go near the top of your .htaccess file. If .htaccess file is not saved then you can create one inside your public_html file.

 

http to https:// without WWW

 

RewriteEngine On

RewriteCond %{SERVER_PORT} 80

RewriteRule ^(.*)$ https://yourdomain.com/$1 [R,L]

 

http to https:// with WWW

 

RewriteEngine On

RewriteCond %{SERVER_PORT} 80

RewriteRule ^(.*)$ https://www.yourdomain.com/$1 [R,L]

 

Note:  Replace “yourdomain.com” with your respective domain name