Community Tip - Fixing Code 1004: DNS Validation Error

CommunityTip

#1

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

Background
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.

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.

  • 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 “example.com”.
    • If you’re using Kajabi, review these setup resources here and 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 example.com
  • 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. Read more on Configuring CAA Records.
    • 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 www.example.com.cdn.cloudflare.net 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.
For Code 1004 errors on MX Records.

Background Resources
Knowledge Base
YouTube

Research The Issue
Community
Google

If You Need More Help
This community of other Cloudflare users may be able to assist you, if not, login to Cloudflare and then contact Cloudflare Support. When you contact support, make sure to include as much of this information as possible: the specific error message your are seeing, the URLs this is happening on, screen shot of the error, steps to reproduce the error, list what DNS record you are you trying to update and what value are you trying to update it to, if you encounter the error on a page rule please explain what the page rule should do, tell us what your page rule currently looks like and a screenshot of the page which include the Page Rule and the error message, and HAR file(s). Please indicate which of the Quick Fix Ideas you’ve tried in order to help Customer Support 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”, or “Do this first” or “In my experience”.

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


An unknown error occurred storing the billing profile (Code: 1004)
An unknown error occurred storing the billing profile (Code: 1004)