Fix Gmail's 550 5.7.40 error by publishing a DMARC record

550 5.7.40 is the bounce Gmail sends when you count as a bulk sender and your sending domain has no DMARC record, or has one that doesn't specify a policy. Gmail requires every bulk sender to publish DMARC, and a policy of p=none is enough to meet the rule. The fix lives in your DNS, not at your email service: one TXT record named _dmarc on the domain in your From address, starting with v=DMARC1 and a p= tag.

Gmail's errors for a missing DMARC record

  • 550 5.7.40

    Gmail blocked the message because the sending domain has no DMARC record, or its record names no policy.

  • 421 4.7.40

    The same complaint, but Gmail rate limited the message instead of blocking it. Your server retries, and each retry finds the record still missing.

  • 4.7.31

    Google's sender guidelines FAQ lists the rate-limit text under this code instead.

  • 504 5.7.40

    Unrelated to DMARC. This one answers a mail client that tried an authentication type Gmail doesn't recognize when signing in to send.

Google lists the 5.7.40 and 4.7.40 texts in its SMTP error reference and the 4.7.31 text in its sender guidelines FAQ.

Why a small site can count as a bulk sender

  • Google's sender guidelines FAQ calls you a bulk sender once you send close to 5,000 messages or more to personal Gmail accounts in 24 hours. It adds up everything from the same primary domain, so 2,500 messages a day from yoursite.com plus 2,500 from news.yoursite.com make you one. Meet that bar once and the status is permanent, even if your volume drops later.

  • The rule covers personal accounts at gmail.com and googlemail.com. The same FAQ says the sender guidelines don't apply to mail sent to Google Workspace accounts, so a domain that mails only business customers on Workspace won't see this error from them.

Check your domain for a DMARC record

# Empty output means there's no DMARC record, the cause of 5.7.40
dig +short TXT _dmarc.yoursite.com

# A record that meets Gmail's rule starts with v=DMARC1 and a p= tag:
# "v=DMARC1; p=none; rua=mailto:dmarc@yoursite.com"

How to fix the 550 5.7.40 error

  1. Make sure SPF and DKIM already passBulk senders need both. Google recommends that SPF and DKIM authenticate your mail for at least 48 hours before you turn on DMARC, so a new record doesn't start failing mail you rely on.
  2. Publish the record at _dmarcAdd a TXT record named _dmarc on the domain in your From address, with the value v=DMARC1; p=none. Google says the v and p tags must come first, and a record without p is exactly what this error describes.
  3. Add a reporting addressPut a rua=mailto: tag in the record with an address you read. Google recommends always including it, and suggests a dedicated mailbox or group rather than your own address, since large organizations can get hundreds or even thousands of reports a day.
  4. Tighten the policy laterGoogle recommends starting at none, reading the reports, then moving to quarantine or reject once you know your legitimate mail passes.

Frequently asked questions

Does p=none stop the 5.7.40 error?

Yes. Google's sender guidelines say a bulk sender's DMARC enforcement policy can be set to none. The error is about a record that's missing or names no policy, not about a lenient one.

Is publishing DMARC all Gmail asks of a bulk sender?

No. The sender guidelines also require SPF and DKIM, a From domain aligned with one of them, valid forward and reverse DNS, TLS, a spam rate below 0.3% in Postmaster Tools and one-click unsubscribe on marketing mail. A From domain that isn't aligned brings its own error, 4.7.32 or 5.7.32.

Which domain needs the DMARC record?

The one in your From address. DMARC compares that domain with the domains SPF and DKIM authenticated, as Google's DMARC setup guide explains. Publish it at _dmarc on that domain or on the main domain it belongs to, such as yoursite.com, since the guide says subdomains inherit the parent domain's policy. A record on your email service's domain doesn't count for yours.