Tiempo estimado de lectura: 1 minutos

How do I configure a domain redirection?

You can set up a domain redirection in a couple of ways. These are described below:

Using the Redirections tool in the control panel

  1. Log in to the administration panel of the server of the site to which you want to add the redirection.
  2. Select the Redirects icon in the Web Tools section.
  3. Select the domain
  4. Now paste the rest of the URL
  5. And the destination address
  6. In general, you should use a 301 Permanent Redirect, but if you only plan to redirect the site temporarily, you can use a 302 Temporary Redirect.
  7. Click on Create Redirect as shown in the video:
Watch video

The difference between the two types of redirects comes down to how search engines handle them. Search engines like Google use the redirect type as a way to find out if the old site should be kept indexed or not.

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

Using .htaccess

An .htaccess file is an important Apache configuration file that usually resides in the public_html folder of your website, it is a way to add specific rules per hostname. An .htaccess rule allows for further configuration of your redirect in case you need a more specific redirect. Below are some common examples that you may need to add.

Redirect your Web to a new domain name

To redirect your Web to another domain using an .htaccess rule, you must 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 no www.

You could achieve this by editing the URL of the site and the home page, 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]


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

RewriteCond %{HTTPS} !=on
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
¿Te ha sido util esta lección? Vota para poder enviarnos tu Feedback
No me gusta 0 0 de 0 han encontrado esta lección util.
Vistas: 18

Still have doubts?

We don't, we want to help you

Contact Us