How do I setup a domain redirect?

How do I setup a domain redirect?

You can setup a domain redirect in a couple of ways. We’ll outline these below:

Using the control panel Redirects tool

  1. Login to your control panel  and head to either your list of packages, or list of domains and select to Manage 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. 

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 do I setup my mailbox in Outlook?

      We make use of 'autodiscover' technology so that in the majority of cases, Microsoft Outlook can set up your account for you with only an email address and a password. Automatic Setup In Outlook, choose the File tab Under 'Account Information', ...
    • Can I use ‘mail.domain’ in my mail client?

      For scale and redundancy reasons we operate each service from its own hostname. So we always recommend using the most relevant hostname for incoming and outgoing servers in mail clients. These are as follows: IMAP: imap.stackmail.com ...
    • What is domain propagation?

      DNS propagation defines the process of updating information across the internet. There are two forms of DNS propagation: the first is the changes made to the DNS zone and the second is the changes made to WHOIS information. An change made to your DNS ...
    • Where can I view the nameservers of a domain?

      If you manage your domain name with VISYOO and have access to it HERE you can view the nameservers the domain is using by following the steps below.  Log in HERE. Select Manage Domains and locate the domain you’d like to check, select Manage. Select ...
    • Where can I view the nameservers of a domain?

      If you manage your domain name with VISYOO and have access to it HERE you can view the nameservers the domain is using by following the steps below.  Log in HERE. Select Manage Domains and locate the domain you’d like to check, select Manage. Select ...