Community Tip - Fixing Code 1004: DNS Validation Error

Try the suggestions in this Community Tip to help you fix Code 1004 errors when working on the Cloudflare dashboard.

A Code 1004 error while working on the Cloudflare dashboard indicates that Cloudflare was unable to complete a requested action. This is a different issue than “Error 1004: Host Not Configured to Serve Web Traffic” or “Error 1004: DNS is still propagating”. Those errors appear to visitors to your website if the origin IP cannot be resolved through your DNS records. Error 1004 is addressed in, Community Tip - Fixing Error 1004: Host Not Configured to Serve Web Traffic / DNS is still propagating.

Registrar, basically free

Cloudflare Diagnostic Center
Checks: nameservers, DNSSEC, DS record configuration, if connecting to ‘’ works, if connecting to ‘’ works, & for existing MX records

Quick Fix Ideas
It is important to understand exactly what error you’re facing. Look for additional details in the error message you are presented.

  • DNS Validation Error: invalid or missing name (Code: 9000)
    • Verify the SRV record you’re adding has a valid name
    • The record you are adding cannot be proxied through Cloudflare. Toggle the cloud icon from orange to grey for this to work.
  • Content for A record is invalid. Must be a valid IPv4 address (Code: 9005)
    • Verify the IP address of your origin server is correct, is not a Cloudflare IP and has not recently been changed by your hosting provider
    • Remove any blank spaces before and after the IP address
    • Wait a few minutes and try again
    • Clear your local cache and/or login to your dashboard from an incognito window
  • Content for CNAME record is invalid (Code: 9007)
    • Check the values of the CNAME record you’re trying to add. A CNAME cannot point to an IP address, it can only point to another hostname
    • Make sure you’re adding the correct details, the name should be “www” and content should be “”.
    • If you’re using Kajabi, review these setup resources here.
  • Invalid content for an MX record (Code: 9009)
    • Try entering up the MX records manually, and not copy paste. You might be copy pasting hidden characters.
    • Check with your email host to make sure you’re using the correct mail server settings for your domain.
    • You’re entering an IP address, an MX-record contains the host name for the mail server, not an IP address, instead of creating the MX record with the IP address, try creating an A record first.
  • Invalid DNS record type (Code: 9020)
    • You’re making the change via API and you’re missing some required parameters for the request.
    • You’re attempting to proxy through port 25. Cloudflare does not proxy on port 25 (SMTP), we simply resolve the DNS. The correct values of the records depend on your email provider. Please see the Lite Reading MX Record section of this tip to see how to add these on your Cloudflare dashboard. To check that the DNS for your mail records are returning correctly through Cloudflare, you can run: dig MX
  • Invalid TTL. Must be between 120 and 2,147,483,647 seconds, or 1 for automatic (Code: 9021)
    • Check to see if there is a space before or after the entries.
    • If you don’t know the TTL value, enter 1 for automatic.
    • A CNAME cannot point to an IP address, it can only point to another hostname. Delete any existing CNAME records with IP addresses and recreate them as A records. An A record is one that points to an IP address.
    • You’re using a mobile version of the Cloudflare dashboard. Input validation when adding DNS records using the mobile version is a known issue, our team is aware of and working on it.
    • If the desktop browser window is narrow enough, on Edge and Chrome it will automatically change to the mobile-optimized view and the same problem as mobile happens.
  • Invalid or missing data for record (Code: 9036)
    • Consider adding your CAA records manually through the UI as opposed to via the API. Consult the Lite Reading section of this tip for details. .
    • Check your API request and make sure you’re including all the necessary details and that you’re using the correct API key.
    • You’re not correctly defining each piece of the SRV record in the data object. Read more in the API documentation.
  • invalid content for ns record (code: 9037)
    • You’re trying to add Cloudflare name servers to your DNS records. The name server records need to be modified at your registrar, not within Cloudflare.
    • If you are using Cloudflare as your authoritative DNS provider, you don’t need name server records unless you want to delegate parts of your site’s DNS to other authoritative DNS. If Cloudflare is your only DNS provider, remove the name server records. Setting your NS records to your Cloudflare nameservers is not allowed as they should be set at your domain registrar.
  • This DNS record cannot be proxied - click the cloud icon to turn it grey to proceed (Code: 9041)
    • Check the value of your entry and make sure it’s entered without any following or leading spaces.
    • You’re trying to proxy (orange cloud) an Amazon SES DKIM record. Domain Key DNS records do not get proxied, they should remain grey clouded.
    • You’re trying to proxy a record is not proxiable, like your router IP address or mail record. By switching it to “Grey Clouded”, Cloudflare will serve the record but the IP address can be exposed.
  • Invalid CNAME target. You aren’t allowed to use records with partial suffixes (Code: 9059)
    • A CNAME DNS record pointed to should only be created when you are using a third-party set of of name servers and you need to proxy through Cloudflare on a partial setup through a hosting provider, not on a full setup when you are using Cloudflare name servers.
      * This option was disabled as it creates a self-referencing loop for Cloudflare internal DNS and overloads it with a large number of requests from external resolvers.
  • priority must be an int between 0 and 65535 (Code: 9104)
    • You’re using a mobile version of the Cloudflare dashboard. Input validation when adding DNS records using the mobile version is a known issue, our team is aware of and working on it.
    • If the desktop browser window is narrow enough, on Edge and Chrome it will automatically change to the mobile-optimised view and the same problem as mobile happens.
  • An unknown error occurred storing the billing profile (Code: 1004)
    • The billing information that you enter must match the information from the credit card account exactly, including ccv number.
    • The card was declined, try another card.
    • Remove the content of the fields “Address 2”, “Company”, and “VAT Number (optional)”.
    • You’re using a prepaid credit card, try a post paid card. You may need to consider using PayPal as your payment method in this instance.
    • Remove any existing payment methods and then add a working card.
  • Page Rule validation failed: See messages for details (Code: 1004), need to increase cache timeout.
    • Remove any Railgun page rules.
    • Your page rule has a redirect loop.

Lite Reading

For Code 1004 errors on the DNS tab, go here.

Community Tutorial

Background Resources
Help Center

Research The Issue

If You Need More Help
This community of other Cloudflare users may be able to assist you, login to Cloudflare and post your question to the Community. When you post on the Community make sure to include as much of this information as possible: the specific error message you are seeing, the URLs this is happening on, screen shot of the error, and the steps to reproduce the error. Please indicate what troubleshooting steps you’ve tried in order to help us help you.

Expert Comments Appreciated
This Community Tip will remain open for input from Community experts and those familiar with this issue. We really appreciate comments like: “What are the three things to always try”, “Do this first”, or “In my experience”.

This is a Cloudflare Community Tip, to review other tips, click here.

Çevirme…traduzir…翻译…traducir…Traduire…Übersetzen…:greyg: Translate this Tip

FXDVCT 101819

DNS Validation Error code 1004
DNS Validation Error (Code: 1004) - changing server IP
Dns validation error 1004 fix?
Error code 1004
An unknown error occurred storing the billing profile (Code: 1004)
DNS validation error (code:1004) Content for CNAME record is invalid
DNS Validation Error (Code: 1004) adding CNAME
Dns validation error (code 1004) this kind of record cannot be proxied
New domain not working
Error - DNS Validation Error (Code: 1004) Content for MX record must be a hostname
Setup new domain
Советы сообщества - Все советы
An unknown error occurred storing the billing profile (Code: 1004)
Community Tip - All Published Tips
Connect subdomain DNS CNAME with Shopify
Consigli della community - Tutti i suggerimenti
Error 1004 : Can replace my Nameservers with cloudshare NS
Why i can not add A record?
[Help please] Minecraft server, last step is lost!
Unable To Add CNAME
I added Cloudflare to my website now my subdomain doesn't work
Impossible d'ajouter CNAME
Community Tip - Alle veröffentlichten Tipps
Dicas da comunidade - Todas as dicas
社區提示 - 所有提示
เคล็ดลับชุมชน - เคล็ดลับทั้งหมด
CommunityTip - Tất cả các mẹo
TipsKomunitas - Semua Tips
コミュニティのヒント - 公開されているすべてのヒント
社区提示 - 所有提示
CommunityTip - Todas la CommunityTips
커뮤니티 팁 - 모든 팁
CommunityTip - Tous les conseils
Unable to add CNAME record for subdomain