Managing DNS records in Cloudflare

Managing DNS records in Cloudflare

Learn the purpose of common DNS records and how you can add or delete those records at Cloudflare. To configure your site on Cloudflare successfully, you add domains and add subdomains via DNS records.

What is DNS?

DNS translates domain names to IP addresses and that’s why it is often called the “phonebook of the Internet.”  For details on DNS and its purpose on the Internet, visit our what is DNS Learning Center.  For DNS records not covered in this article, visit our Learning Center guide on DNS records.

Adding DNS records

When you first add a domain to Cloudflare, a scan of common DNS records is performed in a attempt to automatically add all of the domain’s DNS records to the Cloudflare DNS app. If you need to add records manually for a domain, follow the procedure below:If your domain is added to Cloudflare via one of our hosting partners, manage your DNS records via the hosting partner. In this case, the Cloudflare DNS app informs customers to manage DNS outside of Cloudflare.

  1. Log in to the Cloudflare dashboard.
  2. Click the appropriate Cloudflare account for the domain where you will add records.
  3. Ensure the proper domain is selected.
  4. Click the DNS app.
  5. The UI interface for adding DNS records appears under DNS Records:
Old URL:
Article IDs: 360019093151 | Managing DNS records in Cloudflare
Managing DNS records in Cloudflare

6. Replace Name with a subdomain or the root domain.Per Internet standards, Name must:* be 63 characters or less,

  • start with a letter,
  • end with a letter or digit,
  • and contain only letters, digits, or a hyphen as the interior characters.
    Additionally, Cloudflare allows an underscore _ in the A and CNAME record **Name** since some modern web services support an underscore. However, Cloudflare discourages using underscores due to limited browser support.

7. (Optional) Some record types such AAAAA, and CNAME allow a customer to toggle the Cloudflare proxy on or off.  For the Cloudflare Proxy Toggle:

  • An orange cloud icon proxies traffic through Cloudflare for the DNS record Name.
  • grey cloud icon ensures traffic for the DNS record Name is not proxied to Cloudflare.  Cloudflare still serves DNS for a grey clouded DNS record, but no other Cloudflare features such as SSL, page rules, caching, WAF, etc are applied.

Grey cloud icons for AAAAA, or CNAME records will expose your origin IP address to attackers and allows them to attack your origin IP address directly even if you later proxy traffic to Cloudflare. Direct attacks to your origin IP are only mitigated by asking your hosting provider to change your origin IP address.

8. The Type selection defaults to A records.  Expand the DNS record types in the tables below for further instructions pertaining to each record type:To ensure visitor traffic reaches a domain, a domain requires at least an A or AAAA record to point to the origin web server IP address or a CNAME record that points to the hostname of a hosting service.

Critical DNS records for IP address resolution:▶A▶CNAME▶AAAA

DNS records for email and email authentication:▶TXT▶MX▶DKIM▶SPF▶DMARC

Specialized DNS records:▶CAA▶SRV▶PTR▶SOA

Deleting DNS Records

1. Log in to the Cloudflare dashboard.

2. Choose the appropriate Cloudflare account associated with the domain where you will delete records.

3. Choose the domain for which you will delete records

4. Click the DNS app.

5. Identify the record to delete and click Edit.

6. Click Delete. A confirmation dialog appears.

7. Click Delete again to confirm.

Leave a Comment

Your email address will not be published.