Knowledge base
1000 FAQs, 500 tutorials and explanatory videos. Here, there are only solutions!
This guide explains how to view a site hosted by Infomaniak even if no domain name / URL is currently correctly configured to direct the visitor to this site.
This preview of the site can be done through a Preview URL and allows you to test a website before pointing a domain name that currently points elsewhere, for example.
This temporary URL provided by Infomaniak may change at any time and is available only with paid offers.
Get the Preview URL of your site
With the preview URL of your site, get the current version of your site in a browser regardless of whether the future corresponding domain name is not yet correctly configured:
- log in to the Infomaniak Manager (manager.infomaniak.com) from a web browser like Brave or Firefox
- click on the icon ‍ at the top right of the interface (or navigate using the left side menu, for example)
- choose Website (universe Web & Domain)
- click on the name of the object in the displayed table
- the preview address is indicated under Preview URL (e.g., XXX.preview.infomaniak.website)
In case of problems
If, when visiting your preview address, the URL immediately changes to another, it could be a .htaccess file that you have modified to include rewrite rules. Disable it to test again.
With WordPress
If the preview URL always appears even though you have done what is necessary at the domain name level, you need to assign it the final address as the main address in your site's options.
Alternatives to preview your site
If you want to proceed differently than with the preview address provided by Infomaniak (see above), you can modify the hosts file on your computer (including with browser extensions like this one for Firefox). You will need the IP address of your site for this.
⚠️ For additional help, contact a partner or submit a bid — also read the role of the host
When your tests are completed or when the DNS of the domain name is up to date, do not forget to erase your possible modifications, otherwise it will be impossible to display your website if the server's IP address is changed or if the site is migrated to another hosting.
This guide explains how to protect a part of a site on a Web Hosting by requiring a password before accessing a directory (including subdirectories) from a browser.
Simple Method
Protect a directory with a password (Digest authentication) using the "Folder Protection" tool:
- Click here to access the management of your product in the Infomaniak Manager (need help?).
- Click directly on the name assigned to the relevant product.
- Click on Security in the left-hand menu.
- Click on Folder Protection in the left-hand menu.
- Click on the directory to be protected.
- Enable protection using the toggle switch, then create one or more users*:
- * Users are defined per directory; the tool does not allow managing groups of users:
- * Users are defined per directory; the tool does not allow managing groups of users:
- Click on the Add button.
- Click the button to Add an Access for an additional user if necessary.
- Click on the action menu â‹® to the right of the relevant user to edit or remove them.
- Click the toggle switch again to completely disable the folder's protection:
Manual Method via .htaccess
Protect a folder with a password using your site's .htaccess
file:
1. Choose and Encrypt the Password
- Log in to your hosting via an FTP software/client or the FTP Manager.
In the folder to be protected, create a file named
password.php
and adapt the following content inside it by replacing12345
with the desired password:<?php $pass = "12345"; echo password_hash($pass, PASSWORD_DEFAULT); // Displays the hashed password ?>
- Open a web browser and display the
password.php
file (e.g.,domain.xyz/folder_to_protect/password.php
). - The web browser displays your hashed password; copy it as it will be needed in step 3...
2. Create the .htaccess File
In the folder to be protected, create a file named .htaccess
and adapt the following content inside it:
AuthName "Protected Admin Page"
AuthType Basic
AuthUserFile "/example/.htpasswd"
Require valid-user
Replace /example/
with the absolute path of the folder to protect. Example:
AuthUserFile "/home/clients/0f83c7afb710e5ae2645a1b704d8772f/web/folder_to_protect/.htpasswd"
3. Create the .htpasswd File
In the folder to be protected, create a file named htpasswd.txt
and adapt the following content inside it:
login:hashed_password
- Replace
login
with the desired login. - Replace
hashed_password
with the hashed password copied in step 1 of this guide.
Once the htpasswd.txt
file is saved, rename it as follows: .htpasswd
.
4. Test the Login
Open a web browser and try to access one of the pages in the protected folder. If the guide has been followed correctly, the chosen login and (non-hashed) password will grant access to the protected folder.
Other restrictions can also be applied using .htaccess
.
When activating a new WordPress theme, the formatting and content of articles may be altered if the new theme doesn't use the same shortcodes and/or the same page builder.
Formatting problems after changing WordPress themes
For example, this is how your articles and pages may appear after changing WordPress themes:
Unfortunately, there is no automatic solution to correct this problem: you should either return to the old theme you were using, or manually adapt the content of your site using the tools provided by your new WordPress theme.
Solutions for reducing these problems in the future
Here are a few recommendations that will prevent you from having to reformat all of the content of your site in the event of a theme change:
- Use as few shortcodes as possible for your WordPress theme
- Use a universal page builder that is compatible with all WordPress themes (for example, Visual Composer or Thrive Content Builder)
- Take the time to test and evaluate the quality of a theme before using it and adapting all of the content of your site
Useful Resources
- Find and automatically delete unused shortcodes (article in English)
This guide explains the limitations applied to simultaneous connections to a MySQL database in Web Hosting.
Limitations of Simultaneous Connections to MySQL
MySQL always has limitations on simultaneous connections to ensure that the server operates reliably, securely, and efficiently while effectively utilizing available system resources.
This limitation helps avoid overloading the MySQL server at the expense of other sites hosted on the server.
Once this limit is exceeded, new connections are not possible, and the following message appears: User has already more than 'max_user_connections' active connections
or Warning: mysql_connect(): Too many connections in /home/www/...
This limit is rarely reached in practice, and it is possible to easily bypass it by creating multiple MySQL database users for the different scripts of a website.
No Connection Limit per User per Hour
Infomaniak does not limit the number of MySQL connections per user per hour. The values MAX_QUERIES_PER_HOUR
/ MAX_UPDATES_PER_HOUR
/ MAX_CONNECTIONS_PER_HOUR
are not present on Infomaniak hosting.
Unlike other hosts, you will not risk getting an error message like this: SQL Error : 1226 User 'data_forum' has exceeded the 'max_questions' resource
.
Learn More
This guide explains how to order and use a Mail Service and Web Hosting offered for free with each domain name registered with Infomaniak.
Introduction
- For each domain name registered or transferred to Infomaniak, you can benefit from a free email address that provides access to Mail Infomaniak and a 10 MB web space for a basic page
- It is also possible to have a free Mail Service while having a paid Web offer, or vice versa
Activate the Starter Offer
Prerequisites
- Own a domain name with Infomaniak (a DNS zone alone is not sufficient) (if needed, order or transfer a domain)
- Depending on the desired type (mail or web), you must not have a corresponding product already associated with the domain name within any existing Infomaniak Organization
To order a Starter Mail Service or Starter Web Hosting included with each domain:
- Log in to Infomaniak Manager (manager.infomaniak.com) from a web browser like Brave or Firefox
- Click on the ‍ icon at the top right of the interface (or navigate using the left sidebar menu, for example)
- Select Domains (in the Web & Domain section)
- Click on the name of the relevant item in the displayed table
- Click on the blue Connect a service button (also accessible in the Actions section or via the â‹® icon on the right of the interface:
- Once on the page to connect a service, choose Create an email address
- Click on the search field
- Click on Order and follow the wizard in the Infomaniak Shop to complete the order
- Similarly for creating a basic web page, click on Create a website and follow steps 7 & 8 above:
‍‍
Using a Starter Product
You can then create the desired email address on your Starter Mail Service.
To use the 10 MB web space and create a basic web page on your Starter Web Hosting, use:
- the page editor
- or the FTP file manager to manage your HTML pages
- or any FTP application
Upgrading a Starter Offer
- Modify a mail offer (click here)
- Modify a web offer (click here)
This guide introduces the vulnerability detection tool for your Web Hosting.
Introduction
- There are thousands of cyberthreats, and if your website were to be infected, your business could suffer not only from downtime but also from a loss of trust from your visitors and customers.
- The tool offered by Infomaniak is a free and complementary protection to the antivirus, safeguarding all Infomaniak hostings against malware and security vulnerabilities.
How This Service Works
The tool works behind the scenes to detect potential security issues. These vulnerabilities could allow malicious individuals to alter your website content, damaging your reputation with customers and search engines.
Without any action from you within 7 days of detection, the tool automatically patches security vulnerabilities for most CMSs and/or quarantines malicious software without affecting the proper functioning of your websites.
If needed, you can:
Following a detection by the tool, it is also recommended to check your entire hosting if you notice suspicious file modifications that the protection may not have detected automatically.
A second tab allows you to scan and display outdated applications and extensions on your hosting:
Data Privacy
Like Infomaniak, the tool is compliant with and respects the European Union's General Data Protection Regulation (GDPR): analyses are performed locally on Infomaniak’s servers. The content or signatures of the scanned files are not transmitted outside of Infomaniak’s infrastructure.
In accordance with the privacy policy, the data processed is limited to what is strictly necessary and includes the username, email address, path, and file names, primarily to communicate detections to the client.
This guide explains how to migrate a Web Hosting from MySQL to MariaDB.
MariaDB replaces MySQL!
MariaDB is an enhanced version of MySQL. It comes with many built-in powerful features and numerous improvements in terms of usability, security, and performance.
Key Differences
- MariaDB has a larger connection pool supporting up to 200,000+ connections, while MySQL has a smaller connection pool
- Comparing MariaDB and MySQL performance, replication is faster in MariaDB and slower in MySQL
- MariaDB is Open Source, whereas MySQL uses proprietary code in its Enterprise edition
- Comparing MariaDB and MySQL, MariaDB is faster than MySQL
Using MariaDB as a Replacement for MySQL
Upgrading to MariaDB is irreversible, and all sites on your hosting will subsequently operate with this version of MariaDB. Check the compatibility of your scripts before proceeding.
To migrate a Web Hosting to MariaDB:
- Login to the Infomaniak Manager (manager.infomaniak.com) from a web browser like Brave or Firefox
- Click on the icon ‍ in the top right corner of the interface (or navigate through the left sidebar menu, for example)
- Choose Hosting (universe Web & Domain)
- Click on the name of the relevant object in the displayed table
- Click on Databases in the left sidebar menu
- Click on the link Migrate to MariaDB
To migrate a Managed Cloud Server, follow this guide (click here) on migrating to a new generation of Cloud Server.
Connection to a remote Oracle database is not available with shared hosting and servers.
You can however install OCI8 for PHP on VPS Cloud / VPS Lite.
This guide explains how to install a free extension from Elegant Themes (Monarch, Divi Builder, Bloom, etc.) or a theme on a WordPress site already installed via WordPress & Apps (Infomaniak).
Prerequisites
- Your WordPress site must be installed using Infomaniak WordPress tools to use these themes and extensions
- Infomaniak only allows you to install for free with 1-click the theme (Divi, Extra, etc.) and the extensions (Monarch, Bloom, etc.) of your choice and benefit from official updates; to benefit from their customer service you must subscribe to an Elegant Themes plan.
Using an Elegant Themes plugin
To do this:
- Log in to the Infomaniak Manager (manager.infomaniak.com) from a web browser like Brave or Edge
- Click on the icon at the top right of the interface (or navigate through the left sidebar menu for example)
- Choose Hosting (Web & Domain universe)
- Click on the name of the relevant object in the displayed table
- Click on Website in the left sidebar menu
- Click on WordPress & Apps in the secondary sidebar menu
- Click on the Configure button for the relevant site
- Click on the Premium Extensions button
- Install and activate the desired extensions
- The extensions are then available in your WordPress admin console
Using an Elegant Themes theme
Follow this guide to install an Elegant Themes theme with Infomaniak.
This guide details sending emails from a website hosted by Infomaniak using the PHP function mail() function, which is disabled by default.
Infomaniak strongly advises against using the PHP mail() function for sending emails from your applications:
- Emails will be considered "unauthenticated" and therefore subject to limits
- Their deliverability will be impacted, which can harm your website
Specify the sending address
To ensure that messages are sent correctly from your CMS/web application (and avoid an error like Could not instantiate mail function
or sender mismatch
), it is necessary to specify a valid address in the site settings on the Infomaniak side:
- Login to the Infomaniak Manager (manager.infomaniak.com) from a web browser like Brave or Firefox
- Click on the ‍ icon at the top right of the interface (or navigate through the left side menu, for example)
- Choose Hosting (Web & Domain universe)
- Click directly on the name of the relevant object in the displayed table
- Click on the name of the relevant site (in the Sites section)
- Click on the Advanced Settings button
- Enter an existing email address in the Sender Email field
- Click the blue Save button
Re-enable the mail function
If you still wish to use the PHP mail function, you will need to re-enable it on each of the sites in your Web Hosting account:
- Login to the Infomaniak Manager (manager.infomaniak.com) from a web browser like Brave or Firefox
- Click on the ‍ icon at the top right of the interface (or navigate through the left side menu, for example)
- Choose Hosting (Web & Domain universe)
- Click directly on the name of the relevant object in the displayed table
- Click on the name of the relevant site (in the Sites section)
- Click on the Advanced Settings button
- Click on the PHP tab
- Enable the mail function
- Click Save
PHP mail() Example
WordPress
Configure the sending of the default contact form included with Divi Builder:
- Login to the WordPress admin panel
- Go to the Divi editor of the page containing the contact form
- Click on the gear icon to set up the Divi contact form
- Under EMAIL, enter the email address that will receive the form submissions and save
- By default, when a visitor uses the form to contact you, you will receive an email from
mail@your-site-name
, and if you reply, the recipient will automatically be the email address provided by the visitor when filling out the contact form
Joomla
Configure email sending via PHPmail (not recommended) in Joomla:
- Login to your Joomla site's administration panel
- Go to Configuration then Server
- DO NOT enter anything in the Site Email field
Unfortunately, this prevents any sending test via the button for this purpose, but it will work if you set up a contact form on your site. Click Save once the box is left empty.
Reply-to Address for PHP mail()
When sending an email with the PHP mail() function, the return-path
will be in the form root@h2web3.infomaniak.ch
, for example. However, the Reply-To:
header in your form code allows you to specify a valid reply address.