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.
Web Redirection Tool Guide: click here
via DNS changes or A records
Changing the DNS of the domain name or modifying its A/AAAA records allows to direct web traffic to another provider.
Act on the code of the pages
via HTML code to insert
Insert 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 insert
If the site page has a .php extension, insert this header function call at the top of the file:header('Location: htttps://www.site.xyz/page-de-destination');
via .htaccess file
To 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:RewriteEngine On
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):
RewriteEngine on
RewriteRule "old/path/url "/" [L]