1000 FAQs, 500 tutorials and explanatory videos. Here, there are only solutions!
Optimize content delivery (CDN)
This guide explains how to activate a CDN to optimize an Infomaniak Web Hosting.
What is a CDN?
CDN stands for "Content Delivery Network" in English, which translates to "Red de Distribución de Contenido" in Spanish and "Content Delivery Network" in Italian. A CDN stores a copy of your site's content (images, videos, CSS/JS files) on multiple servers geographically dispersed. When a user accesses your site, the CDN provides this content from the server closest to their location, thereby reducing loading times.
Advantages of a CDN
- Improved loading speed: your site loads faster for visitors, which can reduce bounce rates and improve user experience.
- Reduced load on your origin server: by distributing content, the CDN lightens the load on your main server, improving its performance and availability.
- Increased security: some CDNs offer security features such as protection against DDoS attacks and data security.
Setting up a CDN
To use a CDN, you will generally need to make adjustments to your domain name configuration, specifically at the DNS records level. This will redirect your site's traffic to the CDN's network of servers. So in general:
- Create an account on the CDN's website of your choice and add your site.
- Modify the DNS zone of your domain name according to the instructions provided by the CDN.
- Test your site to ensure that the CDN is working correctly.
Cloudflare
Cloudflare CDN optimizes the performance and security of a website. It is a reverse proxy, which means that once your site starts using CloudFlare, the traffic it receives is routed through CloudFlare's network. Additionally, Cloudflare provides the following features:
- Caching of a site's static content
- Minification of HTML, CSS, and Javascript code
- Basic DDoS protection
- etc.
To set up Cloudflare:
- If necessary, create an account with Cloudflare: https://www.cloudflare.com/sign-up
- Add the domain name of the site in question.
- Transfer all the DNS zone records of the domain in question to Cloudflare (A, MX, TXT, NS, etc.).
- In the Infomaniak Manager, modify the DNS zone of the domain in question with the DNS servers indicated by Cloudflare.
It may take up to 48 hours for the new DNS to take effect.
Note: mod_cloudflare is enabled by default on all our paid Web Hosting plans.
Amazon CloudFront
If you are already using AWS services, CloudFront is easy to set up. Create a distribution, configure the settings, and link it to your site.
Fastly
Sign up for Fastly, configure your service by adding your site, and define cache settings. Fastly offers advanced configuration options.