πŸ›‘οΈ
Security

Setting Up Cloudflare for CDN and DDoS Protection

πŸ“… 10 October 2026 ✏️ 10 October 2026 ⏱ 5 min leestijd

Learn step by step how to set up Cloudflare as CDN and DDoS protection for your website, including DNS, SSL, and caching settings.

Cloudflare is a free service that speeds up your website with a global network (CDN) and protects it against DDoS attacks. By routing your DNS traffic through Cloudflare, static files are delivered closer to your visitor and malicious traffic is filtered before it reaches your server. In this article, you’ll learn how to set up Cloudflare correctly, which settings are important, and how to avoid problems.

What exactly do CDN and DDoS protection do

A CDN (Content Delivery Network) stores copies of your images, CSS, and JavaScript files on servers around the world. A visitor from Germany then doesn’t retrieve those files from your Dutch server, but from a nearby server, which shortens loading time. DDoS protection means Cloudflare evaluates all incoming traffic first. Suspicious traffic, such as an overwhelming number of requests from botnets, is blocked before it reaches your server. Your own server remains unburdened and accessible, even during an attack.

Because Cloudflare sits between your visitor and your server, it also hides the real IP address of your server. This makes targeted attacks on your hosting environment more difficult.

VisitorCloudflareCDN + FilterServer

Setting up Cloudflare in 5 steps

1

Create an account and add your domain

Create a free account on Cloudflare.com and add your domain name. Cloudflare automatically scans your existing DNS records and displays them for review.

2

Check DNS records

Check whether all A records, CNAMEs, and MX records have been correctly imported. If anything is missing, add it manually before continuing, otherwise your email or website will stop working.

3

Change nameservers

Cloudflare gives you two nameservers. Replace your domain’s current nameservers with these at your domain registrar. This change may take some time to propagate everywhere.

4

Set SSL/TLS mode

In the SSL/TLS menu, choose ‘Full’ or ‘Full (strict)’ if your server already has a valid SSL certificate. This ensures an encrypted connection between Cloudflare and your server.

5

Activate security and caching

Set the security level to ‘Medium’ or higher and enable caching for static files. After activation, check whether your website and email still function normally.

Important settings after installation

After the basic configuration, there are a few settings that make a difference. Turn on ‘Always Use HTTPS’ so visitors always connect via a secure connection. Use ‘Auto Minify’ to automatically compress CSS, JavaScript, and HTML. In the Page Rules or Cache Rules, set which folders may be cached more aggressively, such as images, and which should not, such as a shopping cart or customer portal.

Also check the ‘Under Attack Mode’. You can manually enable this during an active attack; visitors will then first see a brief verification page before being let through. This effectively filters out automated attack traffic.

πŸ’‘ Tip: After every change in Cloudflare, test whether your website, email, and any forms still work. An incorrect SSL mode or a missing DNS record is the most common cause of issues after setting up Cloudflare.

Common mistakes and how to avoid them

A common mistake is forgetting the MX records, causing email to stop arriving. Always check this before changing the nameservers. Also, make sure your SPF, DKIM, and DMARC records remain correct for email, otherwise the reliability of your business email may decrease.

Another common mistake is choosing the SSL mode ‘Flexible’ while your server already has its own certificate. This can lead to a redirect loop. In that case, always choose ‘Full’ or ‘Full (strict)’.

Also pay attention to caching of dynamic pages. If you cache, for example, a login page or shopping cart, visitors may see outdated or incorrect information. Explicitly exclude these kinds of paths via Cache Rules.

At Tandata, you’ll find the DNS settings and SSL options clearly organized in Plesk, making it easier to combine with Cloudflare. If you’re unsure about a configuration, consult the knowledge base or contact support.

Frequently Asked Questions

Is Cloudflare free to use?

Yes, Cloudflare’s free plan already offers CDN functionality, a free SSL certificate, and basic DDoS protection. This is sufficient for most smaller websites.

Does Cloudflare work with my own SSL certificate?

Yes, as long as you set the SSL/TLS mode to ‘Full’ or ‘Full (strict)’, your own certificate remains active on the server and Cloudflare encrypts the traffic in between.

Can Cloudflare affect my email?

Only if your MX, SPF, DKIM, or DMARC records are not correctly carried over when changing nameservers. Always check these records beforehand, especially if you use business email.

Do I need to move my domain name to use Cloudflare?

No, you don’t need to move your domain name. You only change the nameservers at your current registrar to those of Cloudflare.

Does Cloudflare protect against all types of DDoS attacks?

Cloudflare effectively filters out the most common volumetric and application-layer attacks, but no protection is one hundred percent foolproof. Combine it with a well-secured server for best results.

Conclusion

Setting up Cloudflare as a CDN and DDoS protection can be done within half an hour and immediately results in a faster and more secure website. Check your DNS records beforehand, choose the right SSL mode, and test after activation whether everything keeps working. If you get stuck, our support team is happy to help, even if you’re considering switching to Tandata with your hosting.

View web hosting β†’

Was dit artikel nuttig?