1000 FAQs, 500 tutorials and explanatory videos. Here, there are only solutions!
Redirect the visitor (domain, web page, etc.)
This guide explains how to redirect a domain name directly to another or how to automatically send visitors to your website to another page address (internal or external URL).
You will need to act either on the domain name itself (it must be hosted by Infomaniak and its DNS must also be those of Infomaniak) or on the code present in your pages (.htaccess page, home page, etc.) if you have a website.
Act on the domain name
via Web Redirection Tool
We recommend the use of the tool available in your Manager allowing you to act in a simple way on the domain name (or sub-domain) in order to redirect it to the Internet address of your choice.
via DNS changes or A records
Act on the code of the pages
via HTML code to insertInsert this line of code between the and tags of your home page (usually named index.html):
<meta http-equiv="refresh" content="5; URL=https://www.adresse-de-destination.xyz">
Replace 5 by the desired waiting time in seconds (0 to make it happen immediately).
The Google search engine indicates that it is preferable to use a redirection of type 301 on the server side (read below). The W3C also advises not to use it.
via PHP code to insertIf the site page has a .php extension, insert this header function call at the top of the file:
via .htaccess fileTo redirect absolutely all traffic to your site (regardless of the page called) to another address, insert this in the .htacces file at the root of your site:
RewriteRule ^(.*)$ https://www.adresse-de-destination.xyz/$1 [R=301]
To target the page to be redirected:
Redirect permanent /ancienne_page.html https://adresse-de-destination.xyz
Redirectpermanent, Redirect permanent and Redirect 301 are equivalent commands.
Here is another example of redirecting a subpart to the home page (this directive has the advantage of working with deep links, unlike a permanent redirect):
RewriteRule "old/path/url "/" [L]