Redirecting a domain name managed by OVHcloud
Find out about the various redirection types, and how to create one for a domain name managed by OVHcloud
Find out about the various redirection types, and how to create one for a domain name managed by OVHcloud
Last updated 6th October 2022
Redirecting a domain name is to redirect it to a new target. Different types of redirections exist, each responding to a specific need.
This guide explains how to redirect your domain name.
This feature allows you to redirect a domain or subdomain to:
domain.tld
http://www.domain.tld/welcome/
or https://www.domain.tld/welcome/
(if the target domain has a compatible SSL certificate)There are several ways of doing this:
Setting up a redirection can affect your SEO ranking. Be careful about the changes you apply, or contact a specialised provider for SEO if necessary.
Warning: A redirection created from the OVHcloud Control Panel does not redirect an URL as https://
to another domain or URL.
To create this type of redirection, you will have to apply a URL rewrite, for example by editing a ".htaccess" file.
Log in to the OVHcloud Control Panel, go to the Web Cloud
section, select the domain to redirect from Domain names
, then click on the Redirection
tab.
The table displays active redirections for your domain name. You can manage your existing redirections using the ...
button to the right of each line.
Click the Add Redirection
button.
Three redirection options are available from the OVHcloud Control Panel, and each of them is made up of 5 successive steps.
The
Redirection
tab contains a fourth option that allows your domain to be quickly pointed to DNS A, AAAA and CNAME records.
Since this is not strictly a "redirection", this option will not be detailed in this guide.For more information on DNS records, see our DNS records.
Below are the three types of redirections detailed step by step.
Whichever redirection option you choose, the change can take between 4 and a maximum of 24 hours to propagate fully.
After entering the domain which is being redirected into a browser's address bar, the target domain will be displayed instead.
domain1.tld
to domain2.tld
, domain2.tld
will appear in the address bar in your browser.This "standard" redirection will return a HTTP 301 code.
Click on the tabs below to view each of the 5 steps in turn.
In the popup window, your domain to redirect already appears. Fill in the form only if you wish to redirect a subdomain.
The Also redirect
box can be checked to also redirect the www
subdomain to the same target you choose for your domain/subdomain.
Click Next
to proceed to step 2.
Select To a web address
.
Click Next
to proceed to step 3.
Select A visible redirection
from the two choices shown.
Click Next
to proceed to step 4.
Select Permanent (301)
from the two choices listed, then enter the target domain or URL for your redirection in the Web address
form that appears.
Click Next
to proceed to step 5.
In this last step, check that the information displayed is correct.
Click on Confirm
to confirm your configuration.
If the message "Some redirections from domains that you want to redirect conflict with existing redirections" appears, you can tick the Confirm the overwriting of the existing redirection
box to force your redirection to be applied.
Warning, the old configuration will be disabled and deleted.
As with option 1, this option displays the target domain in your browser's address bar instead of the redirected domain after you enter the redirected domain.
However, this option is the appropriate choice for non-permanent redirections, for example temporary events.
Positioning on search engines is less efficient than with a permanent visible redirection of type 301 (HTTP code).
domain1.tld
to domain2.tld
, domain2.tld
will appear in the address bar in your browser.This redirection will return a HTTP 302 code.
Click on the tabs below to view each of the 5 steps in turn.
In the popup window, your domain to redirect already appears. Fill in the form only if you wish to redirect a subdomain.
The Also redirect
box can be checked to also redirect the www
subdomain to the same target you choose for your domain/subdomain.
Click Next
to proceed to step 2.
Select To a web address
.
Click Next
to proceed to step 3.
Select A visible redirection
from the two choices shown.
Click Next
to proceed to step 4.
Select Temporary (302)
from the two choices listed, then enter the target domain or URL for your redirection in the Web Address
form that appears.
Click Next
to proceed to step 5.
In this last step, check that the information displayed is correct.
Click on Confirm
to confirm your configuration.
If the message "Some redirections from domains that you want to redirect conflict with existing redirections" appears, you can tick the Confirm the overwriting of the existing redirection
box to force your redirection to be applied.
Warning, the old configuration will be disabled and deleted.
With this redirection, you can keep the redirected domain in your browser’s address bar after you have entered it, rather than replacing it with the target domain.
Warning, this action is not compatible with all sites and affects the SEO of your site.
domain1.tld
to domain2.tld
, domain1.tld
will appear in the address bar in your browser.Invisible redirection works with an iFrame HTML tag. This allows your redirected domain to integrate the content of the other page corresponding to the target domain into its own HTML page.
This type of embedded content prevents your site visitors from viewing the target domain.
This option will return an HTTP 200 code.
Warning, pages embedded with an iFrame tag may not be read on smartphones. Their content is generally not taken into account by search engines for the SEO and indexing of your site.
Click on the tabs below to view each of the 5 steps in turn.
In the popup window, your domain to redirect already appears. Fill in the form only if you wish to redirect a subdomain.
The Also redirect
box can be checked to also redirect the www
subdomain to the same target you choose for your domain/subdomain.
Click Next
to proceed to step 2.
Select To a web address
.
Click Next
to proceed to step 3.
Select With an invisible redirection
from the two choices shown.
Click Next
to proceed to step 4.
Select Temporary (iframe)
from the two choices listed, then enter the target domain or URL for your redirection in the Web Address
form that appears.
Three optional settings are available at this stage:
Click Next
to proceed to step 5.
In this last step, check that the information displayed is correct.
Click on Confirm
to confirm your configuration.
If the message "Some redirections from domains that you want to redirect conflict with existing redirections" appears, you can tick the Confirm the overwriting of the existing redirection
box to force your redirection to be applied.
Warning, the old configuration will be disabled and deleted.
OVHcloud provides services that you are responsible for with regard to their configuration and management. It is therefore your responsibility to ensure that they function properly.
This guide is designed to help you with common tasks. Nevertheless, we recommend contacting a specialist provider if you encounter any difficulties. We will not be able to assist you. You can find more information in the Go further section of this guide.
".htaccess" files are configuration files in which commands can be specified. When the web server (Apache) runs your website’s code, the commands are interpreted, then executed.
You can use such commands to create redirections.
A faulty .htaccess file can make your website inaccessible. If in doubt, contact a specialist provider.
You can find all of our documentation on .htaccess in the "Go further" section of this guide.
We recommend that you back up your .htaccess file before making any changes. This way, you can restore the previous version of the file if you make a mistake.
Below, you will find 4 variables for redirections via the .htaccess file.
This variable allows you to redirect a site as a whole, or only a part of a site, to another site or another part of a site. Visitors are automatically redirected to the correct URL/address when they try to access your site via the historical URL/address.
To redirect an entire website:
Redirect permanent / http://domainTarget.tld/
To redirect one directory to another:
Redirect permanent /old_folder http://domain.tld/new_folder
To redirect a file to another:
Redirect permanent /old_file.php http://domain.tld/new_file.php
The script will return a HTTP 301 code. This will warn search engine bots to update their links to the new address/URL.
This variable is useful for deleted files. It replaces the message 404 document not found with a more explicit message such as 410 document no longer exists. Your website visitor will be informed that the file they are trying to call no longer exists.
Redirect gone /fileDeleted.html
The script will return HTTP 410 code.
If you change the extension of a file, you can use the seeother variable to change the file type. The visitor who tries to access the old file will be automatically redirected to the one with the correct extension.
Redirect seeother /example.doc http://domain.tld/example.pdf
The script will return HTTP 303 code.
This variable can be used when you temporarily move files to another site. Visitors who try to access your site via the historical address/URL are automatically redirected to the new temporary address/URL.
Redirect temp / http://OtherWebsite.tld/site/
The script will return HTTP 302 code.
Tutorial - How do I block access to my website for certain IP addresses via a .htaccess file?.
Protecting your website’s administration interface with a .htaccess file.
URL rewriting using mod_rewrite.
Using .htaccess for advanced purposes.
For specialised services (SEO, development, etc.), contact OVHcloud partners.
If you would like assistance using and configuring your OVHcloud solutions, please refer to our support offers.
Join our community of users on https://community.ovh.com/en/.
Please feel free to give any suggestions in order to improve this documentation.
Whether your feedback is about images, content, or structure, please share it, so that we can improve it together.
Your support requests will not be processed via this form. To do this, please use the "Create a ticket" form.
Thank you. Your feedback has been received.
Access your community space. Ask questions, search for information, post content, and interact with other OVHcloud Community members.
Discuss with the OVHcloud community