How to use Cloudflare for DNS, cache and protection
Updated 10/23/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 pricingRelated tutorials
How to find your IP address on Windows: public and local
Find your public IP address in a second and your local IP from Settings, Command Prompt or PowerShell, on Windows 10 and 11.
Updated 10/23/2026Networking & DNSHow to find your IP address on Linux: public and local
Find your public and local IP address on Linux: ip addr, hostname -I, GNOME Settings and the right way on a headless server.
Updated 10/23/2026Networking & DNSEmail DNS records: SPF, DKIM and DMARC
Set up SPF, DKIM and DMARC so your emails reach the inbox, not spam.
Updated 10/23/2026