Use Cloudflare with your website
Recommended DNS, proxy and SSL settings when your domain runs through Cloudflare.
Cloudflare can manage the DNS of your domain and act as a proxy in front of your website. The free Cloudflare plan is enough. This guide shows how to add your domain to Cloudflare and which SSL setting to use so that HTTPS works with your website.
Add your domain to Cloudflare
Create a Cloudflare account
Go to cloudflare.com and sign up for a free account.
Add the domain
After signing in choose Enter an existing domain and type your domain name, for example
yourdomain.com.Scan the DNS records
Select Quick scan for DNS records and click Continue. Cloudflare reads the current DNS records of the domain.
Choose a plan
Choose the Free plan unless you need the paid features.
Check the DNS records
Cloudflare shows the records it found. Confirm that all your existing records (A, CNAME, MX and so on) are there and correct — after the switch, only the records in Cloudflare are used.
If the domain has used our DNS servers so far, compare the list with the DNS zone of the domain in the Control Panel — see Manage DNS records. The records your website needs are described in DNS settings for custom domains.
Switch the name servers
Cloudflare gives you two name servers, for example abby.ns.cloudflare.com and ivan.ns.cloudflare.com.
Open your domain registrar
Sign in where you bought the domain (Namecheap, for example) and open the name server settings of the domain.
Replace the name servers
Replace the current name servers — ours or anyone else's — with the two from Cloudflare.
Wait for the change
The change may take up to 24 hours, but usually happens faster. Cloudflare activates the domain once it sees the new name servers.
Set up SSL/HTTPS
Open the SSL/TLS settings
In the Cloudflare dashboard open your domain and go to the SSL/TLS tab.
Choose the encryption mode
Set the SSL mode to Full (recommended), or to Full (strict) if your website has a valid certificate.
Enable HTTPS for the website
In the Control Panel open your website, choose HTTPS in the left menu and click Enable HTTPS on the row of the domain. See Enable HTTPS with Let's Encrypt.
Your domain now uses Cloudflare DNS.
Warning
Both Full modes connect to your website over HTTPS, so the website needs a certificate for the domain. Do not skip the last step.