Knowledge base
1000 FAQs, 500 tutorials and explanatory videos. Here, there are only solutions!
This guide explains how to add or modify one or more TXT records in the DNS zone (of a domain name) managed on Infomaniak Manager.
TXT Type
This type of record allows you to insert human-readable text into the DNS zone of a domain name.
It is commonly used for spam prevention and to verify domain ownership (Google may request this before using some of their services).
Modify the DNS Zone
Refer to this guide (click here) for the steps to manage records in a DNS zone.
This guide explains how to add or modify one or more CNAME and DNAME records in the DNS zone (of a domain) managed on Infomaniak's Manager.
Type CNAME and DNAME
The CNAME record type allows you to point a subdomain to a website address.
This is the method commonly used to make the subdomain www work with your site or to redirect a subdomain to a folder on the web server hosting your website.
A DNAME (delegation name) creates a domain alias, just like a CNAME, but this alias will also redirect all subdomains. For example, a DNAME on site1.com pointing to site2.com will link blog.site1.com to blog.site2.com, new.login.domaine.com to new.login.exemple.com, and so on. However, it will not directly link site1.com to site2.com. You will need to use another type of record for that.
Editing the DNS Zone
Refer to this guide (click here) to learn how to manage records in a DNS zone.
This guide explains how to disable the plugins installed on your WordPress.
Why disable all WordPress plugins?
If you encounter a problem with your website, disabling the WordPress plugins quickly allows you to identify if one of them is the cause of the problem and thus to draw the necessary conclusions in order to repair your website.
How to disable plugins quickly?
To disable all WordPress plugins:
- Log in via FTP (read this FAQ if necessary)
- Go to the website location (folder corresponding to your WordPress website)
- Rename /wp-content/plugins as /wp-content/_plugins, for example
Variant to disable a specific plugin:
- Rename /wp-content/plugins/nomDuPlugin as /wp-content/plugins/_nomDuPlugin, for example
This guide explains how to display absolute paths for certain web applications that need to know them.
Get the absolute path of a hosting
To access the web hosting to add a new site:
- Log in to the Infomaniak Manager (manager.infomaniak.com) from a web browser like Brave or Edge
- Click on the icon in the top right corner of the interface (or navigate through the left side menu, for example)
- Choose Hosting (Web & Domain universe)
- Click on the name of the relevant object in the displayed table
- Click on More information (under Information)
- The absolute path is displayed below (e.g.,
/home/clients/0f83c7xxx710e5ae2645xxx704d8772f/
)
Get the absolute path of a site
For this:
- Follow the above procedure to get the absolute path of the hosting on which the site is installed
- At the end of the absolute path of the hosting, specify the site directory (learn more) e.g.:
- If the site is placed in the directory
/web
and the absolute path of the hosting is/home/clients/0f83c7xxx710e5ae2645xxx704d8772f/
then the absolute path of the site is/home/clients/0f83c7xxx710e5ae2645xxx704d8772f/web/
- If the site is placed in the directory
This guide concerns inbound and outbound traffic permissions between different hosting platforms at the database level.
Accessing databases from another hosting...
...from shared hosting
From a shared hosting (except old v1 formula - 60 GB), it is possible to connect to databases
- from another shared hosting
- from hosting on a Cloud Server
You can therefore share a database and establish a remote connection, or even cross-access.
...from a Cloud Server
From a Cloud Server, it is possible to connect to databases
- from another Cloud Server (you need to open port
3306
in TCP / input in the firewall)
but it is not possible to connect to databases of shared hosting.
From another host
Regarding access to MySQL databases from another host other than Infomaniak, please read this guide.
This guide details the use of Perl or Python scripts on Infomaniak Web Hosting.
Perl and Python Scripts & CGI
Perl and Python scripts are often used with Apache's CGID module to generate dynamic content on web servers. This module allows Apache to process requests using scripts written in Perl or Python through the Common Gateway Interface (CGI) protocol, thereby enabling the creation of interactive and responsive web pages based on user interactions with the site.
However, for security reasons, Infomaniak has chosen to disable the ability to execute scripts written in Perl or Python via this specific Apache module (CGID) on its shared hosting offers.
Details
- The location (path) of the Python interpreter is /usr/bin/python
- mod_python is not supported
- Running scripts without the .pl or .cgi extension is not possible; however, a .pl file can exist and be called via a URL without the extension
If you receive the following error message:
CGIWrap Error: Execution of this script not permitted
Execution of that script is not permitted for the following reason:
(1) Script file not found.
Request Data:Extra Path Info: /folder/wwwdata/collection/thumbnails/blabla.PL.12.34.56.gif
even though the loaded file is a simple GIF image with a filename like "blabla.PL.12.34.56.gif," this is due to the filenames in question. To work around the issue, simply rename your files.
This guide details the compatibility of Infomaniak's web hosting with IPv4 and IPv6.
Prelude
- Infomaniak supports both IPv4 and IPv6, providing optimal connectivity for all users
- only Starter (free) hosting and older hosting plans are not compatible: upgrade a Cloud Server or shared hosting
- compatibility with IPv4 and IPv6 means that Infomaniak's hosting service allows websites to be accessible to users using both IPv4 and IPv6 addresses
- this ensures that your site can be visited by all types of devices and networks, providing an optimal experience for your users, regardless of the protocol they use to connect to the internet
IPv4, or Internet Protocol version 4
This is the first version of the Internet protocol widely used since the 1980s. It uses 32-bit IP addresses, which allow devices connected to the internet to be identified and located. However, with the exhaustion of IPv4 addresses, it has become necessary to develop a new version (read more below):
- example of an IPv4 address: 192.168.0.1
- in this example, the IPv4 address consists of four groups of numbers separated by dots
- each group can contain a number from 0 to 255
- the address 192.168.0.1 is often used to represent a local IP address in a private network
- find the IP of your website: read this guide
- get the public IP of your current internet connection: https://chk.me/ip
IPv6, or Internet Protocol version 6
This is the latest version of the Internet protocol introduced to address the issue of IPv4 address exhaustion. IPv6 uses 128-bit IP addresses, providing practically unlimited addressing space. It also offers enhanced features such as security, quality of service, and automatic address configuration:
- example of an IPv6 address: 2001:0db8:85a3:0000:0000:8a2e:0370:7334
- in this example, the IPv6 address consists of eight groups of numbers and letters separated by colons
- each group can contain a hexadecimal number from 0 to FFFF
- the IPv6 address is much longer than the IPv4 address, thus providing a much larger addressing space
This guide explains how to modify the error_reporting()
directive on your website.
Enable Error Reporting
Include the following 2 lines in your .user.ini
file:
display_errors=on
error_reporting=E_ALL & ~E_NOTICE & ~E_STRICT
If your browser displays neither errors nor warnings, then there are none.
Disable PHP Error Display
For WordPress, edit the wp-config.php file and replace the line:
define('WP_DEBUG', false);
with:
ini_set('display_errors','Off');
ini_set('error_reporting', E_ALL );
define('WP_DEBUG', false);
define('WP_DEBUG_DISPLAY', false);
Otherwise, add the following code to the .user.ini file:
display_errors=off
This guide explains how to move an existing website within an Infomaniak Web Hosting to another Infomaniak web hosting.
Preamble
- There are not many turnkey solutions for moving a website.
- Generally speaking, few hosting providers offer the export or import of a complete site with its databases; this is mainly because there are many ways to build a website and just as many languages that are often incompatible with each other.
- However, if the site to be transferred is built with WordPress, check out this other guide for a simplified solution.
- It is also possible to move an entire web hosting (see below).
- For additional help, contact a partner or launch a free request for proposal — also discover the role of the host.
Manual solution: example of website transfer
To do it manually, you need to:
- Retrieve the web data and the associated databases,
- Republish this on a site created on the destination web hosting,
- And if the associated domain name is the same, the first site will need to be deleted or renamed.
Here is an example of how to proceed:
- Order the other Web Hosting / Cloud Server if you haven't done so yet.
- Create a "dummy site" on this new hosting (e.g. dev.domain.xyz - see below).
- Manually copy your data via FTP and MySQL (export / import).
- Adapt your site if necessary (database address, etc.).
- Once you are satisfied with the "new site," delete the old one.
- Change the name of the new site to its real name.
Alternatively, in step 2 above, you can work with the alias www.
that you can detach from your current site. The alias www(.domain.xyz) is often set up as an alias for your site, and detaching it allows you to create a site on the other hosting with the name www.domain.xyz (don't forget, in step 6, to add your alias "domain.xyz" without the www to the new site).
Moving entire web hosting accounts
There is an automated way to move an Infomaniak web hosting to:
- An Infomaniak Cloud Server (if the hosting is currently shared or if the hosting is already on Cloud Server)
- Another Infomaniak Organization
A Starter hosting cannot be moved but it can be converted.
This guide is relevant to you if you are experiencing page encoding issues and abnormal characters appearing on your pages.
Universal Encoding
If you encounter page encoding issues, it is important to check that your page encoding is set to UTF-8. UTF-8 is a universal encoding that supports most characters used worldwide. It can happen that some files contain characters that are incompatible with UTF-8 encoding. In this case, you need to convert them to UTF-8 using a suitable text editor.
If the HTML page encoding is, for example, UTF-8 while the database is in latin-1, accents will not be interpreted correctly by MySQL. If the pages contain special characters (Arabic texts, Chinese, accents), they may display correctly on your website but not in phpMyAdmin, or vice versa...
Use a text editor capable of saving your files in UTF-8. If you import text files with SQL code inside, they should be edited with software that saves in UTF-8.
UTF-8 in PHP
To force the site headers to UTF-8 using PHP, you can use the header()
function with the Content-Type
parameter. Here is an example of code that forces character encoding to UTF-8:
<?php
header('Content-Type: text/html; charset=utf-8');
?>
UTF-8 via .htaccess
To force character encoding to UTF-8 via your site's .htaccess file, for HTML content add:
AddDefaultCharset utf-8
Header set Content-Type "text/html; charset=utf-8"
And for PHP content add:
php_value default_charset UTF-8
php_value mbstring.internal_encoding UTF-8
UTF-8 in HTML
To specify character encoding as UTF-8 in HTML code, you can use the charset
meta tag:
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Page Title</title>
</head>
<body>
<!-- Page content -->
</body>
</html>
Make sure that all files used on your website, such as CSS style files and JavaScript scripts, are also encoded in UTF-8. This ensures that all characters on your website will be displayed correctly.
UTF-8 in Databases
To (re)declare the encoding of databases and tables as UTF-8 in phpMyAdmin, you can follow these steps:
- Log in to your phpMyAdmin control panel
- Click on the "Operations" tab at the top
- In the "Table Options" section, find the "Collation" line and click on the dropdown button
- Select a collation option that uses UTF-8 encoding, such as
utf8_general_ci
- Click the "Execute" button at the bottom of the page to save the changes
Add the PHP function mysql_set_charset
to the connection created by mysql_connect
to determine the encoding of this connection (if you do not specify it, the default value for this parameter may vary from server to server):
$connection = mysql_connect($server, $username, $password);
mysql_set_charset('utf8', $connection);
You can also modify this default parameter across your hosting by following this documentation.
Once the MySQL connection is established from a PHP script, you can also specify the UTF8 charset type with these commands:
mysql_query("SET NAMES 'utf8';");
mysql_query("SET CHARACTER SET 'utf8';");
Accents / Special Characters
If you retrieve a MySQL dump (backup) and import it into your database, it may happen that all accents are replaced by strange characters (like "?").
MySQL backups are made in UTF8 format. Accented characters are then encoded in two bytes. Importing these backups poses no problem on servers, however, you need to adjust your local configuration for importing UTF8 databases on your machine.
For example, you can perform a conversion from utf8 to latin1 on the SQL file before importing.
Otherwise, during the database import, simply specify that your input file is in iso-latin1 format (import section, "Character set of the file") and the import will proceed correctly.
When special characters are converted to '?', it is likely that the file you are importing is in a non-UTF8 format and the software is configured to import a UTF-8 file. Linux can convert to UTF-8 using the 'iconv' command.