Guides Guides 6 min read 1,125 words

How to Use Cloudflare: DNS and CDN Setup Guide

Set up Cloudflare without confusing DNS hosting with its web proxy. Review records, nameservers, HTTPS and email before considering the move complete.

To use Cloudflare with an existing domain, add the domain to your account, review its DNS records and replace its nameservers at your registrar. For eligible website records, enabling the proxy sends HTTP and HTTPS traffic through Cloudflare, making its caching and web security features available.

Those are separate decisions: Cloudflare can host your DNS without proxying your website. We recommend checking the records and services you depend on before changing delegation, then verifying the website and email rather than treating an active dashboard status as the only success test.

Before you start: keep registration, hosting and DNS separate

You need a registered domain and access to the account that controls its nameservers. Adding a domain to Cloudflare DNS does not require moving its registration to Cloudflare Registrar. Your website can remain with its current host, provided the DNS records continue to point to the correct service.

If these roles are unfamiliar, our guide to how DNS works explains the lookup process. To identify where your registration is managed, start with our domain lookup tool and check the registrar shown for your domain.

Before making changes, keep a copy of the current nameserver values and the full DNS zone. Include the main website, www, other subdomains, mail-related records and verification entries. A working homepage alone does not prove that a replacement DNS zone is complete.

Step 1: add your domain to Cloudflare

  1. Create a Cloudflare account if you do not already have one, then sign in to its dashboard.
  2. Go to Domains and select Onboard a domain.
  3. Enter your apex domain, such as example.com, and choose how to add its DNS records.
  4. Select Continue and choose a plan appropriate for the features you need.

These names follow Cloudflare's current full-setup instructions. Older screenshots may say Add Site instead. Follow the current documentation if a dashboard label changes; do not add a different domain merely because an old screenshot uses one as an example.

Explanatory diagram: Add the domain: Review imported DNS records carefully.. Update at the registrar: Use the nameservers assigned to your zone.. Choose proxy status: Eligible web records can be proxied.
Explanatory illustration, not a current dashboard screenshot or configuration test. Based on Cloudflare documentation checked 13 November 2026: https://developers.cloudflare.com/fundamentals/manage-domains/add-site/

Step 2: review every required DNS record

Cloudflare offers a quick scan, but explicitly says the scan may not find every existing record. Compare the result with the current provider's zone before you activate the new nameservers. You can add missing records manually rather than assuming an empty list means the domain needs none.

  • Apex and www: use the A, AAAA or CNAME records required by the website host.
  • Other subdomains: account for a store, blog, support site or other service that uses its own hostname.
  • Email: preserve the provider's MX records and relevant address records, plus SPF, DKIM and DMARC entries.
  • Verification: keep records used by third-party services to prove domain ownership.

Use the values supplied by the relevant provider, not example addresses from a tutorial. Our explanation of DNS record types helps distinguish a record's name, type and destination.

Step 3: choose proxy status deliberately

Only eligible A, AAAA and CNAME records can be proxied. The orange-cloud Proxied setting routes web traffic through Cloudflare. The gray-cloud DNS only setting provides DNS answers without putting that HTTP or HTTPS traffic through its network.

Keep mail services and ownership-verification records DNS-only where required. MX and TXT records are always DNS-only. If a hosting or SaaS provider specifies a particular setup, follow that service's integration requirements instead of turning every cloud orange.

For a closer explanation of that switch, see our Cloudflare proxy guide. DNS activation alone does not mean every hostname is using the CDN.

Step 4: replace nameservers at your registrar

  1. Copy the two nameservers assigned to this domain during onboarding. You can find them again on the zone's Overview page.
  2. Sign in to the registrar or other account controlling the domain's delegation.
  3. If DNSSEC is active, follow the migration instructions to turn off the old DNSSEC configuration before replacing nameservers. Cloudflare warns that changing delegation while the old configuration remains active can make the domain unreachable.
  4. Replace the existing authoritative nameservers with the exact Cloudflare-assigned values and save.
  5. Return to Cloudflare and check activation status.

Do not copy the nameservers from someone else's domain or leave an old provider mixed into the set. Cloudflare's standard full setup uses the assigned pair. Its instructions say to allow up to 24 hours for registrar updates; cached lookup results may take longer to reflect what changed.

For provider-specific navigation, use our Hostinger nameserver instructions or the current help page from your registrar. Changing an NS record inside a zone is not a substitute for changing the domain's delegation.

Step 5: verify HTTPS before relying on the proxy

For proxied HTTPS, consider both connections: visitor to Cloudflare and Cloudflare to the origin host. Cloudflare recommends Full (strict) when possible. The origin must accept HTTPS and present an unexpired certificate from a publicly trusted authority or Cloudflare Origin CA that matches the requested or target hostname.

In the dashboard, the setting is under SSL/TLS > Overview. Check the origin's certificate and HTTPS support before selecting a mode. A certificate error is a reason to fix the origin configuration, not a reason to assume that the browser-facing certificate protects every part of the connection.

Step 6: check activation, then test real services

Cloudflare sends an email when the zone becomes active, and the Domains page shows its status. You can also query nameservers with dig ns example.com @1.1.1.1 on a system with dig available, replacing the example with your domain.

After activation, check the apex address, www and important subdomains. Send and receive test email, review mail authentication records, and try the parts of the site that matter, such as sign-in or checkout. Keep the old configuration available while investigating differences rather than changing several unrelated settings at once.

If you disabled DNSSEC for the migration, re-enable it through Cloudflare using its instructions once the zone is active. Do not restore an old provider's DNSSEC details over the new configuration.

Frequently asked questions

Does an active domain mean all pages are cached?

No. Activation establishes Cloudflare's role in DNS; proxy status determines whether web traffic passes through it. Caching is another layer. We explain cache eligibility and dynamic-content limits in our Cloudflare cache guide.

Can the website go offline during setup?

Yes, misconfigured records, stale DNSSEC settings or an incompatible HTTPS setup can interrupt service. Preparing a matching zone reduces avoidable problems, but there is no honest guarantee that a nameserver change cannot cause downtime.

Must we enable every suggested optimization immediately?

No. Finish the DNS and HTTPS checks first. Additional rules should solve a specific need and be followed by another service check, so a new problem can be traced to a particular change.

Sources