1000 FAQs, 500 tutorials and explanatory videos. Here, there are only solutions!
Optimize Content Dissemination (CDN)
This guide explains how to activate a CDN to optimize a Web hosting Infomaniak.
Preamble
- CDN means "Content Delivery Network" in English, which is translated in French as "Network de diffusion de contenu".
- A CDN stores a copy of the content of your site (images, videos, CSS/JS files) on several geographically dispersed servers.
- When a user accesses your site, the CDN provides this content from the server closest to its location, thus reducing loading times:
- Your site loads faster for visitors, which can reduce the rebound rate and improve the user experience.
- By distributing content, the CDN lightens the load of your main server, improving its performance and availability.
- Some CDNs offer security features such as protection against DDoS attacks and data security.
Set up a CDN
To use a CDN, you will usually have to make adjustments to the configuration of your domain name, specifically at the level of DNS records. This will direct traffic from your website to the NDC server network. So in general:
- Create an account on the CDN website of your choice and add your site to it.
- Edit the DNS area of your domain nameas directed by the CDN.
- Test your site to make sure the CDN works properly.
Cloudflare specific guide
For customers who wish to optimize their site in the face of the overloads caused by the intensive passage of bots, the use of a CDN as Cloudflare is often recommended. The Cloudflare CDN optimizes the performance and security of a website, including the following features:
- cache the static content of a site
- minification of HTML, CSS and Javascript code
- basic anti-DDoS protection
- etc.
To set up Cloudflare:
- If necessary, Create an account at Cloudflare.
- Add the domain name of the site concerned.
- Postpone all records of the DNS area of the domain concerned at Cloudflare (records A, MX, TXT, NS, etc.).
- On the Manager Infomaniak, Edit DNS the domain concerned with the DNS servers indicated by Cloudflare.
- Configure DKIM and DNSSEC If necessary.
- Any DNS addition/amendment may take up to 48 hours to spread.
Note: mod_cloudflare
is enabled by default on all paid web hostings.
Enable Rate Limit Cloudflare
In default configuration, Cloudflare simply acts as an intermediary between the site and Infomaniak, returning all queries to Infomaniak servers. Thus, when traffic peaks or attacks occur, queries still reach the original server, but with Cloudflare IP addresses, making it difficult to manage mitigation on a shared server.
Setting up "rate limiting" rules in Cloudflare's application firewall is now an effective solution proposed This feature limits the number of queries sent to the server, blocking aggressive scans and protecting the server from excessive overload.
And also...
... 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 setting the cache settings. Fastly offers advanced configuration options.