Knowledge base
1000 FAQs, 500 tutorials and explanatory videos. Here, there are only solutions!
This guide details the use of Crontab (crons via SSH), available only on Serveur Cloud, by default (there is also a task scheduler for all hosting).
Prerequisites
- The script files called by the cron must be executable (CHMOD).
Absolute path
Cron tasks are not aware of the absolute path. Calling PHP without specifying the full paths to the executable therefore makes it impossible to execute the task.
It is necessary to specify
/opt/phpX.X/bin/php
by replacing X.X
with the desired PHP version (/opt/php7.1/bin/php
for example).
Other operations
List the crons for the SSH user in question:
crontab -l -u NomUtilisateurSSH
Edit the crons:
crontab -e -u NomUtilisateurSSH
To be notified by email of the result of your cron tasks (to be added at the beginning of the file):
MAILTO=e-mail@domain.xyz
Restore a backup
Infomaniak backs up crons for the last 7 days (once a day). In case of accidental deletion, contact Infomaniak support to request a restoration by specifying the time and date of the deletion.
This guide helps you protect against hotlinking on Web Hosting.
Preamble
- Hotlinking, also known as "leeching" or "bandwidth theft", occurs when a website directly integrates resources (such as images, videos, or audio files) hosted on another site, without the latter's authorization.
- This means that the remote site is used to display the content on the hotlinking site, which can result in unauthorized use of resources and bandwidth consumption for the owner of the remote site.
Preventing hotlinking
Content owners can implement measures to prevent hotlinking, such as rules in the .htaccess
file at the root of the website to block requests from specific sites or to redirect to a replacement image:
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?infomaniak.com [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?google.com [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?bing.com [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?yahoo.com [NC]
RewriteRule \.(jpg|jpeg|png|gif|svg)$ https://infomaniak.com/imagederemplacement.png [NC,R,L]
Replace "infomaniak.com
" above with the address of your site.
Remove the 3 lines google/bing/yahoo
if you do not want these 3 sites to be allowed to display your images.
This guide helps you find the public IP address of your device, which can be useful for certain support requests, among other things.
Display the public IP address on the connected device
Click here to obtain the public IP address of your device in IPv4
and IPv6
format.
Alternative methods
Visit ipinfo.io or ifconfig.me.
... on macOS
- From a terminal application (command line interface, CLI) on your device, run the command
curl ifconfig.me
and press enter. - The displayed address is the public IP address of the computer.
Do not forget that this address can change periodically, especially if the router restarts or if the internet service provider uses dynamic IP address allocation.
To automate the search for the public IP address, use commands or scripts that query services such as api.ipify.org
...
This guide explains how to use PHP environment variables with Web Hosting that runs on php-fpm
.
Preamble
- PHP environment variables (
REDIRECT_
) are system variables used to store information about HTTP requests and redirects. - They are generally used on web servers to store details about previous requests or redirections that have been performed.
- The prefix "
REDIRECT_
" is often added to environment variables to indicate that they are related to specific redirections performed by the server. - These variables can contain information such as previous URLs, HTTP methods, or other data related to the client's navigation on the web server.
Using environment variables
To use PHP environment variables:
- Define the PHP environment variables in a
.htaccess
file:SetEnv EXAMPLEVARIABLE hello
- In your PHP file, the name of the variable to call must be prefixed with
REDIRECT_
:<?php getenv('REDIRECT_EXAMPLEVARIABLE');
In this example, the displayed result will be hello.
Going further with environment variables
It is possible to configure environment variables directly from the Manager for your entire website:
- Click here to access the management of your product on the Infomaniak Manager (need help?).
- Click directly on the name assigned to the concerned product:
- Click on Manage under Advanced settings:
- Click on the PHP / Apache tab.
- Click on the chevron ‍ to expand the Environment Variables section.
- Click on the icon ‍ Add.
- Enter the variable and its value.
- Click on the button to save:
This guide explains how to add a dynamic trust seal to a secure site with a SSL certificate from Sectigo.
Preamble
- As a host, Infomaniak offers SSL certificates to secure its clients' websites
- Sectigo (formerly known as Comodo) is a recognized SSL certificate provider that offers different levels of security
- The "dynamic trust seal", or "Sectigo Trust Seal" / "Sectigo Trust Logo" is a visual that website owners can display on their pages to indicate to visitors that their connection is secure, a sign of trust that informs users that the transactions and information exchanges carried out on the site are encrypted and protected by an SSL certificate issued by Sectigo.
- By using a Sectigo SSL certificate and displaying the dynamic trust seal, a website at Infomaniak benefits not only from secure data exchange but also from increased user trust, which is essential for e-commerce and personal information protection.
Add a trust seal
Here's how a dynamic trust seal works:
- Validation: to obtain such a seal, the site owner must first obtain a valid SSL certificate from Sectigo, which requires a validation process; depending on the level of certificate chosen (Domain Validation - DV, Organization Validation - OV or Extended Validation - EV), this validation can be more or less in-depth
- Installation: once the SSL certificate is obtained and installed on the Infomaniak web server, the website is then able to establish secure HTTPS connections
- Displaying the seal: Sectigo provides an HTML code or a script that the site owner can then integrate into their website; this code allows the dynamic trust seal from Sectigo to be displayed
- Update: the seal is often updated in real-time to reflect the current status of the SSL certificate; if the certificate were to expire or be revoked, the seal would reflect this as well, thus warning potential visitors that the site might no longer be secure
The trust seal consists of an image and an HTML code. The latter only works if a Sectigo certificate is installed on the site and in this case generates an interactive logo that displays the certificate data.
Save one of the images below
Right-click on the image you want to save, then click on Save image as...
- Small
- Medium
- Large
Upload the image to your site
Send the image to your web server (via FTP or your CMS) and note the URL to access this image for the next step (for example https://domain.xyz/wp-content/uploads/sectigo.png
).
Get the code to integrate into your pages
Enter the full address of your image on the page https://www.trustlogo.com/install/index2.html to check if the image is accessible.
Click the Continue button on the same page to get the 2 codes to copy and paste into the header of your web page(s):
Important:
- In the code,
CL1
corresponds to aDV
SSL certificate; replaceCL1
withSC5‍
for anEV
type SSL certificate.
This guide helps resolve issues related to special characters (accents, emojis, etc.) that do not display correctly or appear as symbols like ??, often due to incorrect encoding when connecting to MySQL.
Preamble
- By default, MySQL uses
UTF-8
. - Recent MySQL servers are generally configured to use
UTF-8
orUTF-8MB4
by default.- This is suitable for most cases, especially for international languages and emojis.
- Also refer to this other guide to learn how to avoid causing encoding issues with non-European characters and emojis in your developments.
Set the default MySQL / MariaDB charset (Cloud Server)
With a Infomaniak Cloud Server, it is possible to set the default charset (utf8
or utf8mb4
):
- Click here to access the management of your product on the Infomaniak Manager (need help?).
- Click directly on the name assigned to the relevant product.
- Click on MariaDB in the left sidebar and then choose the default charset:
If you have not yet migrated to MariaDB, the principle is the same:
Force a specific encoding (e.g., latin1
)
If you need to work with a database in latin1
(ISO-8859-1), you must explicitly set the encoding when connecting, depending on your environment.
For current offers, place the following code in a user.ini
file located at the root of your hosting:
mysql.connect_charset = "latin1"
mysqli.connect_charset = "latin1"
pdo_mysql.connect_charset = "latin1"
or in PHP (MySQL API):
mysql_query("SET CHARACTER SET latin1");
On older hosting plans, force the MySQL connection to latin1
via the .htaccess
file located at the root of your hosting:
php_value mysql.connect_charset latin1
php_value mysqli.connect_charset latin1
php_value pdo_mysql.connect_charset latin1
The possible indication information_schema
does not directly concern you.
Please disregard it.
It is an internal database of MySQL that is a summary of the information from your own databases.
This guide explains how to manage interactions between your Infomaniak VOD/AOD space and any of your WordPress sites, using an extension developed by Infomaniak.
Preamble
- This WordPress extension allows you to retrieve and manage all your videos present on an Infomaniak VOD/AOD space, with automatic updates when new videos are added.
- It handles the automatic retrieval of existing Players and playlist management.
- You can search for your videos while writing an article or a page, or import media directly from the CMS administration.
- ⚠️ The use of the Infomaniak plugin must be done with the classic editor (Classic Editor):
- The plugin is not compatible with
Elementor
, and therefore cannot be used with this site editor. - Also incompatible with WordPress Multisite.
- The plugin is not compatible with
- If you encounter any issues activating the plugin, disable the following option in the
Really Simple SSL
plugin:- If problems persist, refer to this other guide.
Get the VOD Infomaniak extension
Go to your VOD space to get the information needed for the WordPress external module:
- Click here to access the management of your product on the Infomaniak Manager (need help?).
- Click directly on the name assigned to the relevant product.
- Click on CMS/API Extensions in the left sidebar.
- Click on CMS Extensions in the left sidebar.
- Download the WordPress extension.
- Configure the extension using the provided instructions:
- It is recommended to create a new user in your Organization with only technical rights on the VOD/AOD product and then create the application password from this dedicated account.
You can also download the extension directly from the WordPress plugin directory.
To help you identify the most suitable kSuite offer for your needs, refer to this other guide.
The kSuite offer provided by Infomaniak does not include web hosting service for a page or a website on the Internet.
It is of course possible to subscribe to a Web Hosting Infomaniak from the same user account and/or the same Organization and to build your website with the tool of your choice such as WordPress or Site Creator.
To help you identify the most suitable hosting offer for your needs, refer to this other guide.
Supervisor is not offered directly because systemd
is recommended, better integrated with Debian and available in Fast installer.
If you were to install it anyway, contact Infomaniak support in writing.
This guide details the possible actions to combat unwanted content that may appear on your WordPress site when it is not sufficiently protected.
Introduction
- When your WordPress site is not sufficiently protected or monitored, spam bots take advantage of the comment system to post thousands of messages (obviously containing links to their fraudulent activities).
- Any form (contact, voting, booking, etc.) can also be exploited for malicious activities if nothing is done in advance to protect against it.
- This will affect your site (no one will leave a serious comment), the reputation of the domain name, your activities and the server itself to the point of saturating it and impacting other sites on the same space.
- It is therefore crucial to take care of your site's health and ensure its proper functioning throughout its lifespan.
Fighting unwanted comments
First, carefully follow the solutions proposed by the WordPress codex. You will learn, for example, that disabling the comment system via the WordPress dashboard only affects future posts; it is therefore important to follow one of the alternative methods proposed by WordPress for a more radical deactivation.
If you still want to collect comments, you can for example limit them to registered users (refer to the official help regarding the comments settings page) but you will then need to monitor registrations.
Fighting spam submissions
An effective protection against automated comments and the exploitation of any form on your site involves implementing a captcha
, or its alternative, the honeypot
(honey pot). You will thus close the door to bots
(robots programmed to browse the Web and exploit its vulnerabilities).
Akismet, developed by Automattic
, the company behind WordPress, receives good reviews but becomes paid for commercial use.
By installing WordPress on your Infomaniak site via the automatic installation system, you will find the WP Armour – Honeypot Anti Spam extension already activated, to protect in its free version all types of forms, such as those of WP Comments, WP Registration, BBPress Forum, Contact Form 7, Gravity Forms, Elementor Forms, Divi Theme Contact Form, WooCommerce Reviews Pro, etc.
If you want an alternative dedicated solely to the contact form Contact Form 7, add its protective Honeypot extension.
Another extension receives many favorable reviews: La Sentinelle antispam !
The role of the hoster
You can learn more about the mechanisms put in place by Infomaniak to combat this issue through the article and the FAQ about the tools available if you have a website.‍
This guide explains how to change the URL of your website from the Joomla app installed on your Web Hosting Infomaniak (only in the case where you have installed Joomla via the dedicated tools offered by Infomaniak).
This allows you to assign a different domain name to your Joomla site.
Prerequisites
- The domain name you wish to use must first be added as an alias to the main domain on the relevant site.
Change the domain name of Joomla
To change the address of the site created with Joomla to another domain name that is already in the same Organization:
- Click here to access your site management on the Infomaniak Manager (need help?).
- Click directly on the name assigned to the relevant product:
- Click on the action menu â‹® located to the right of the relevant Web Application.
- Click on Settings for the application:
- Click on Edit to the right of the Joomla:
- Under Site URL, select the desired web address from the dropdown menu:
- If you have not followed the prerequisites above, the desired domain will not appear even if it is registered within the same Organization.
- If you have added the domain as an alias for the site, the desired domain will appear and you will be able to select it to replace the previous domain.
- Click on the Save button:
Domain “…preview.infomaniak.website”?
Among the URLs present in the dropdown menu, the preview URL allows you to access your Joomla site in case the site's domain name is not yet correctly configured to point to your app.
Change the address or location of Joomla
⚠️ These manipulations break the link between your Joomla and the Infomaniak Web Applications system; it will no longer be possible to benefit from the advantages of the latter. For additional help contact a partner or launch a free tender — also discover the role of the host.
Prerequisites
- Create an FTP account (need help?).
- Connect via FTP (need help?).
To modify the Joomla installation if it was done in a subfolder…
… and if the latter is visible in the site address each time it is consulted…
… here is how to proceed:
- On the FTP, move up to the root (in the target folder of the website) all the files of your Joomla currently installed in a subfolder (folder
/primary
in the example below): - Delete the now-empty subfolder.
- Modify the
.htaccess
file located at the root of your Joomla directory. - Replace
RewriteBase /primary
withRewriteBase /
: - Save the changes.
- Do not uninstall the Joomla Web Application but simply stop using it and connect directly to the management interface of your Joomla via the URL
/administrator
:
This guide helps you protect the reputation of your domain name, to maintain the trust of Internet users and service providers in your website or business, thereby facilitating the smooth operation of your email.
The web reputation
There are different types of reputation on the Internet, including personal reputation, corporate reputation, and domain reputation.
Domain reputation is essentially a score that determines how email systems decide what to let through to users' inboxes. Fundamentally, the reputation of your domain is a measure of the health and legitimacy of your domain. This reputation can be influenced by the security of your email and website.
For example, the reputation of a domain can decrease if…
- … the site visible at the domain address is hacked, leading to the mass sending of fraudulent emails,
- … the domain's email is exploited for the involuntary sending of spam.
If the reputation of your domain remains poor, your emails may be marked as spam and not reach their intended audience. This can harm email deliverability (see this other guide in English on this topic).
Improving domain reputation
By following these few tips, you can improve the reputation of your domain and, for example, boost all your email marketing efforts:
- Set up and verify SPF, DKIM, and DMARC records that help protect your domain from identity theft attacks.
- Check the reputation of your domain with tools such as Google Postmaster Tools, Sender Score, Microsoft SNDS, McAfee or Talos Intelligence and identify potential issues.
- Only send emails to users who have chosen to subscribe!
- Get trusted links or backlinks…
See this other guide about RBLs.
This guide explains how to view the disk space of a web hosting Infomaniak and display the size of directories.
Find the large folders of a Web hosting
To do this:
- Log in to the server via SSH (need help?).
Run the following SSH command:
ncdu
- Navigate through the folder tree using the keyboard's arrow keys.
- Exit with the key combination
CTRL + C
.
This guide explains how to change the URL of a site on which the Prestashop application is installed (manual installation on your side) but more generally, it also allows you to import a Prestashop site to Infomaniak if it was previously registered elsewhere with a different URL.
Preamble
- If you are using Prestashop installed via the Infomaniak Manager Apps, you can change the address very easily.
- Intended for version 1.7 of Prestashop, this guide requires technical knowledge and Infomaniak declines any responsibility in case of errors on the site.
Change the URL of an installed Prestashop
To do this:
- Put your Prestashop into maintenance mode (go to Shop Settings then Maintenance).
- Go to Shop Parameters > Traffic and SEO.
- A little further down, modify the Shop URL section:
- under Shop Domain enter the new domain
- under SSL Domain enter the new domain
- the base path can be modified at your convenience but with caution
- Click on Save.
- Download the entire data Web + MySQL of your old Prestashop to your computer.
- Re-import the downloaded MySQL data into a new database.
- Update the
parameters.php
file (located inapp/config/
) by entering the information of the new database at the following lines:database_host
database_name
database_user
database_password
- Re-import the Web data into the directory of your new site (new URL).
- Remove all the content from the cache folder except for the
index.php
file. - Remove the site from maintenance and test the entire site (links, images, cart, etc.).
Also, refer to this other guide.
This guide explains how to find out the operating system version of the server for your Web Hosting.
Preamble
- Even if Debian or a package appears outdated, the displayed versions do not have vulnerabilities:
- Infomaniak keeps them up to date through regular internal patches on all components and systems used.
- The versions are chosen for their stability, then enhanced by security measures that classic tests do not detect.
- If you or your clients identify a vulnerability in an Infomaniak product, please submit a proof of concept. Although rare, these cases are handled quickly.
- Data security is the user's responsibility: Infomaniak cannot be held accountable for poor management or use of access credentials.
What OS is on my site?
To find out the version:
- Log in to the server via SSH (need help?).
Run the following command:
lsb_release -a
You will get information of this type:
Distributor ID: Debian Description: Debian GNU/Linux 7.9 (wheezy) Release: 7.9 Codename: wheezy
This guide explains what spamtrap email addresses are.
Preamble
- A spamtrap, also known as a honeypot, is a tool used to detect and catch spammers.
- It is essentially an email address or a system that is created to attract unwanted messages, such as spam.
How a Spamtrap Address Works
A spamtrap address works by attracting spam and identifying the senders of unwanted mail. Here's how it can happen:
- An email address is specifically created to act as a spam trap; it is generally configured so as not to receive legitimate communication.
- The spamtrap address is hidden or obscured so that it is not visible to legitimate users, but only to spammers; this can be done by placing it on hidden web pages, in forums inaccessible to the public or by making it invisible to humans (for example by using white text on a white background).
- Spammers use automated techniques to extract email addresses from various sources, such as websites, forums, social networks, or stolen address lists; during this process, they may inadvertently or intentionally include spamtraps in their lists.
- When a spammer sends a message to a spamtrap address, it is captured and recorded; since the address is not used for legitimate communication, any mail received is considered unwanted.
- When a spamtrap receives a spam, it triggers an alert for email service providers like Infomaniak; they can then identify the sender of the spam by examining the message headers or the information related to the source IP address.
- Once a spammer is identified through a spamtrap, measures can be taken to block or filter their unwanted messages; Infomaniak can add the spammer's IP address to a blacklist, implement stricter anti-spam filters or take other steps to protect their users.
This guide explains how to access the configuration of a Infomaniak Web site to display technical information such as the PHP, Apache version or the activated PHP extensions and modules.
View the site's technical information
To access the website management:
- Click here to access the management of your product on the Infomaniak Manager (need help?).
- Click directly on the name assigned to the relevant product.
- Click on the Manage button under Advanced Settings:
- Review the website information under the General, PHP / Apache and PHP Extensions tabs:
- Click on the back arrow in the left sidebar.
- Click on Databases in the left sidebar to get the version of MySQL for the web hosting:
This guide explains how to securely transfer files between your machine and the server of the Web hosting using the SCP
protocol (secure copy command).
Preamble
- To function, the
SCP
command requires:- a source: a file/folder to transfer
- a destination: FTP server address for the transfer
- The data is automatically encrypted by
SCP
during the transfer.
Copy a local file to the server
Prerequisites
- To get the FTP server address:
- Click here to access the management of your product on the Infomaniak Manager (need help?).
- Click directly on the name assigned to the relevant product.
- Click on FTP / SSH in the left sidebar.
- The host server address is displayed at the top left:
- To get the destination folder path:
- Click here to access the management of your product on the Infomaniak Manager (need help?).
- Click directly on the name assigned to the relevant product.
- Click on More information (in the Information section):
- Copy the absolute path.
- Complete the absolute path with the desired destination folder.
Next, to copy a file from your machine, the command is as follows:
scp localmachine/path_to_the_file username@ftp_server_adress:/path_to_remote_directory
To copy an entire directory from your machine, you need to adjust the command as follows:
scp -r localmachine/path_to_the_file username@ftp_server_adress:/path_to_remote_directory
The entire folder will be transferred to your server.
To copy the contents of an entire directory from your machine, you need to adjust the command as follows:
scp -r localmachine/path_to_the_file/* username@ftp_server_adress:/path_to_remote_directory
⚠️ For additional help contact a partner or launch a free tender — also discover the role of the host.
This guide concerns MySQL on Infomaniak hosting and their compatibility with stored procedures.
Preamble
- “Stored procedures” & “stored routines” are not possible on Web Hosting.
Understanding stored procedures and routines
If stored procedures are essential to your project and you currently have a shared hosting plan, you might consider a VPS or dedicated server, where you will have more control and resources.
Stored procedures offer a powerful and efficient way to automate tasks and manage business logic at the database level, which can result in more performant and easier-to-maintain applications.
On Serveur Cloud, as soon as the user has administrator rights on the relevant MySQL database, they have the necessary permissions to execute SQL instructions, including the EXECUTE
command, which is used to run existing stored procedures in the database.
He also has the required privileges to create new stored procedures. Creating a stored procedure typically involves using specific SQL syntax to define the instructions to be executed, followed by saving this definition in the database.