CloudLinux.ro
Networking & DNS

How to use Cloudflare for DNS, cache and protection

Updated 7/20/2026

Cloudflare is a free service that sits in front of your site: it manages DNS, serves content from a global cache and adds protection. Here is how to use it.

1. Add the domain to Cloudflare

You create an account, add the domain, and Cloudflare imports the existing DNS records.

2. Change the nameservers at the registrar

Cloudflare gives you two nameservers. You set them at the domain registrar (where you bought the domain). After propagation, DNS is managed by Cloudflare.

3. Proxy mode

For each record, you can enable the proxy (the orange cloud):

  • Proxied: traffic goes through Cloudflare, which hides the server IP and adds cache and protection.
  • DNS only: Cloudflare just resolves the name, traffic goes straight to the server (needed for services like SSH or email).

4. Cache and speed

Cloudflare keeps static files (images, CSS, JS) in data centers around the world, so visitors get them fast, also reducing your server's traffic.

Note

Even with Cloudflare in front, your server needs its own HTTPS, see Free SSL certificate, and Nginx optimizations.

Put this guide into practice on your own VPS

EU cloud servers, billed hourly, ready in minutes, with one-click installs for dozens of apps.

See pricing

Related tutorials