Uk2 Logo

Knowledgebase

Back to Tools and Features

How To Setup a Redirect


There are a few ways in which you can setup a redirect for a domain, we will details these below. Please note if you have a hosting package with us, we would recommend Method Two using StackCP.


Method One: Free Redirect via CHI

Step One: Navigate To The Redirect Section Of CHI

1. Sign into your https://chi.uk2.net account and open the Domains section.

2. Click Manage next the domain name you wish to redirect from the list of domain names that appears.  If you only have one domain name, your list will only show one item, but you still need to click Manage

3. Click on the Redirect widget.



Step Two: Auto-configure WebDiversion For Your Domain

  1. An auto-configuration button may appear.  



  2. Go ahead and click it,  If this button does not appear, Your DNS is already configured and you can continue to the next step.  You may want to make sure there are no duplicate ‘A’ records or ‘CNAME’ records for www.
  3. You should now see a window with your WebDiversion settings.  



  4. You will see a website URL. Make sure the website URL contains the http or https protocol at the front. 
  5. You will also see a Website Title field. This is what will be displayed in the tab area of your internet browser when you visit this diverted domain name.

Method Two: Using StackCP

  1. Login to your CHI and head to either your list of packages, or list of domains and select Manage StackCP next to the domain you wish to add the redirect for. 
  2. Select the Redirects icon, under Web Tools.
  3. Add the domain you would like to be redirected and then the destination address.
  4. In general, you’d want to use the 301 Permanent Redirect, but if you are planning on only temporarily redirecting the site then you can use a 302 Temporary Redirect.

The difference between the two types of redirects is down to how search engines handle them.

Search engines use the redirect type as a way to figure out if the old site needs to be kept indexed.

Essentially if you want the new site to be a replacement for the old site, you should use a 301 Permanent Redirect, if you're developing a new website and your current website may be down for a short time, you may want to use a 302 Temporary Redirect. 


Method Three: Using .htaccess

A .htaccess file is an important Apache configuration file usually resides within the public_html folder of your site, it’s a way to add specific rules on a per-hostname basis. A .htaccess rule allows for further configuration of your redirect should you need a more specific redirect. Below are some common examples you may need to add.

Redirect your website to a new domain

To redirect your website to another domain using a .htaccess rule you’d want to add the following rule to your .htaccess file and then save the file:

RewriteEngine on
RewriteCond %{HTTP_HOST} ^oldsite.com [NC,OR]
RewriteCond %{HTTP_HOST} ^www.oldsite.com [NC]
RewriteRule ^(.*)$ http://newsite.com/$1 [L,R=301,NC]

Force www. instead of non-www.

You could achieve this by editing the site and home URL (if your site is WordPress), but it can also be achieved by using the following rule:

RewriteEngine on
RewriteCond %{HTTP_HOST} ^mywebsite.com [NC]
RewriteRule ^(.*)$ http://www.mywebsite.com/$1 [L,R=301,NC]

Force HTTPS

You can use the Force HTTPS tool from within the control panel to always enable https://, however you can also add the following rule:

RewriteCond %{HTTPS} !=on
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}


Related Articles

How To Add SEO Guru To Addon Domains
How To Add Stats2 To Addon Domains
What Are Perl Modules
Installing Perl Modules
How To Use Cron Jobs

Can’t Find what you need?

No worries, Our experts are here to help.