What does SERVFAIL mean when resolving MX records in AWS VPC?

You’re trying to send a critical email, and your application logs show a SERVFAIL when resolving the MX record. Not a bounce. Not a delivery failure. Just a DNS resolution error. That’s not your email address. It’s not even your code. It’s the network path to the DNS resolver.

SERVFAIL in AWS VPC means the DNS server couldn’t return a response for the MX query—often because your VPC isn’t set up to reach external DNS servers. The problem isn’t the email itself, but the infrastructure around it. In AWS, this usually means outbound DNS traffic is blocked, missing VPC endpoints, or a route table misconfiguration.

This guide breaks down why SERVFAIL pops up during MX lookups in VPC, how to trace it to the root cause, and what to fix—without guessing. You’ll learn how the network layer silently breaks email delivery before a single byte is sent.

Key takeaways

  • SERVFAIL during MX resolution in AWS VPC typically indicates a DNS connectivity or routing issue, not a problem with the email address or destination server.
  • Unconfigured outbound DNS policies, missing VPC endpoints for Route 53 Resolver, or incorrect route tables are common root causes.
  • MX record lookup failures happen before any email transaction begins, so resolution must succeed to enable delivery.

Why does MX resolution fail in AWS VPC despite valid DNS records?

MX resolution fails in AWS VPC even with correct DNS records because outbound DNS traffic is blocked by default unless explicitly allowed via security groups or network ACLs. If your VPC uses a custom DNS server or private hosted zone, connectivity issues or routing misconfigurations can prevent proper resolution, leading to SERVFAIL. Even internal DNS names may fail if the VPC resolver tries to reach public servers for private records.

DNS traffic is blocked by default in AWS VPC

By default, AWS VPCs block all outbound DNS traffic to prevent unintended egress. Without explicit rules allowing UDP and TCP port 53 traffic in security groups or network ACLs, any resolver running inside the VPC cannot reach external DNS servers. This results in SERVFAIL responses, even if the records are valid and properly configured.

Custom and private DNS setups introduce routing complexity

If you’re using a custom DNS server—such as an on-premises or self-hosted resolver—it must be reachable over a secure connection like a VPN or VPC endpoint. Without proper routing or a VPC endpoint configured, the resolver in your VPC will be unable to resolve any domain, including those with valid MX records. Similarly, private hosted zones with non-routable names (e.g., internal.example.com) can still trigger SERVFAIL if the VPC resolver attempts to query public DNS servers for records in a private namespace.

RFC 1035, which defines DNS protocol behavior, specifies that SERVFAIL indicates a server failure, not a record issue. This means the error lies in the resolution path, not the record itself. To test, use dig mx example.com @8.8.8.8 from a machine outside your VPC—if that works but internal queries fail, the problem is in your VPC network configuration.

For teams managing email delivery or monitoring DNS health, verifying domain reachability before sending messages helps catch issues early. Tools like Emaillistchecker.io’s bulk email verification can help identify invalid or undeliverable addresses by validating their DNS and MX settings across real-world conditions, reducing bounce rates and improving sender reputation.

Always validate DNS resolution paths from within the VPC itself using tools like dig or nslookup when troubleshooting. And remember: a perfectly valid MX record won’t help if the network stack blocking the query.

How to verify if the DNS resolver is reachable from your EC2 instance?

You can check if your EC2 instance can reach the DNS resolver by running dig +short MX example.com inside the instance. If you get a SERVFAIL response, the problem lies in the VPC’s DNS resolution or network path — not with the domain itself. Start by confirming your VPC has enableDnsSupport and enableDnsHostnames set to true in the VPC settings.

Check your VPC DNS settings

  • Go to the Amazon VPC console and select your VPC.
  • Verify that Enable DNS hostnames is set to true. This allows instances to use internal DNS names like ip-10-0-0-10.compute-1.amazonaws.com.
  • Ensure Enable DNS support is also true. If disabled, the VPC cannot resolve public or private DNS records.
  • If either is turned off, update it and wait up to 60 seconds for the change to propagate.

Test the DNS resolution directly

  • SSH into your EC2 instance and run: dig +short MX example.com.
  • If you get SERVFAIL or no response, the issue is not with the domain but with DNS resolution.
  • Try a public DNS server: dig +short MX example.com @8.8.8.8. If this works, your instance's default resolver is broken.
  • If the public test fails, check your security group and NACL rules — they might block outbound UDP port 53.
  • For deeper visibility, use dig +trace or nslookup to trace the DNS resolution chain.

While troubleshooting DNS issues in AWS, it helps to understand that DNS resolution relies on a layered stack: VPC settings, EC2 instance configuration, security groups, and underlying network paths. According to AWS’s own documentation, misconfigured enableDnsSupport is one of the most common triggers of SERVFAIL errors in VPCs.

For a broader view of email deliverability concerns — like why a service might fail to send via a specific domain due to DNS or MX issues — consider verifying your email list with a tool that checks MX records and deliverability in real time. Test your list's inbox placement and catch sender reputation risks before they impact delivery.

What AWS VPC settings must be correct for MX record resolution?

You must enable enableDnsSupport and enableDnsHostnames in your VPC. Without enableDnsSupport, the VPC DNS resolver is inactive, making MX record queries fail. Enabling enableDnsHostnames allows EC2 instances to resolve internal DNS names using private hostnames. If using a custom DNS server, ensure your VPC endpoint is configured or that security groups allow outbound UDP and TCP traffic on port 53. These settings are required to resolve email routing records reliably.

DNS Support and Hostname Resolution

  • Ensure enableDnsSupport is set to true in your VPC. This enables the Amazon Route 53 Resolver for your VPC’s internal DNS queries. If disabled, internal DNS resolution fails, which includes MX record lookups.
  • Enable enableDnsHostnames to allow EC2 instances to resolve DNS names using their private hostnames (e.g., ip-10-0-1-10.ec2.internal), which is essential for services that rely on internal DNS for email infrastructure checks.
  • Test DNS resolution from an EC2 instance using dig or nslookup to verify MX records. If you get SERVFAIL, it often indicates a missing or misconfigured DNS setting.

Custom DNS and Network Configuration

  • If you're using a custom DNS server (e.g., a self-managed DNS resolver or third-party service), ensure your VPC has a vpce (VPC endpoint) for Route 53 Resolver or allow outbound traffic on UDP and TCP port 53 from your EC2 instances.
  • Check security group rules: outbound rules must permit port 53 traffic to your DNS server. Misconfigured security groups are a common cause of SERVFAIL when trying to resolve MX records.
  • Verify your VPC’s Route 53 Resolver is active and correctly associated with the VPC. You can check this in the AWS Management Console under Route 53 Resolver.
  • Use AWS’s official documentation on VPC DNS to verify your configuration aligns with best practices.

If you’re trying to validate email lists or test deliverability from AWS EC2 instances, you may need to resolve MX records accurately. You can use our bulk verification tool to identify invalid or non-routable email addresses after troubleshooting DNS issues.

How to test MX resolution in a controlled environment using AWS tools?

You can test MX record resolution failures with SERVFAIL in AWS VPC by using EC2 instances in the same subnet to run DNS queries, monitoring outbound traffic with CloudWatch and VPC Flow Logs, and filtering for UDP port 53 traffic to identify dropped or timed-out queries. This setup isolates the issue from external network factors.

Set up a diagnostic environment

  1. Launch an EC2 instance in the same subnet as your application or service that's failing to resolve MX records.
  2. Connect via SSH and install standard DNS tools like dig or nslookup if not already present.
  3. Run dig MX example.com from the instance and observe the response. If you see SERVFAIL, you've confirmed the failure occurs within AWS.

Monitor network behavior with AWS tools

  1. Enable VPC Flow Logs on the subnet to capture traffic between the EC2 instance and your configured DNS servers (e.g., Amazon Route 53 Resolver endpoints or custom DNS).
  2. Filter logs for UDP traffic on port 53, focusing on the flow from the EC2 instance to the DNS server IP.
  3. Use CloudWatch Logs to track whether queries are sent but no responses are received — a sign of dropped packets or firewall rules blocking responses.
  4. Look for patterns such as consistent timeouts or missing reply packets, which indicate a network ACL, security group, or DNS resolver misconfiguration.
  5. If no traffic appears, check the security group settings to ensure outbound traffic on port 53 is allowed. If traffic shows but no replies, investigate DNS resolver health and ensure it's not rate-limiting or dropping queries.

For context, DNS recursion and response size can affect UDP handling; responses over 512 bytes may trigger DNS truncation if not properly handled with EDNS0, a common root cause of SERVFAIL in constrained environments.

Set up a diagnostic environmentThe 3 steps described in “Set up a diagnostic environment”, in order.1Launch an EC2 instance in the same subnet as your application or servicethat's failing to resolve MX records.2Connect via SSH and install standard DNS tools like dig or nslookup ifnot already present.3Run dig MX example.com from the instance and observe the response. Ifyou see SERVFAIL, you've confirmed the failure occurs within AWS.
The 3 steps described in “Set up a diagnostic environment”, in order.

Use tools like dig +tcp or dig +edns=0 to test if switching to TCP or enabling EDNS resolves the issue — this helps identify protocol-level problems.

Once you've isolated the failure to a specific component — a security group, Route 53 Resolver configuration, or third-party DNS provider — you can take corrective action. For instance, adjusting outbound rules or ensuring recursive DNS is configured properly in the resolver.

These steps mimic real-world conditions while keeping variables under control. You’re not relying on external tools or assumptions — you’re testing inside your infrastructure with traceable data.

What role does Amazon Route 53 play in MX record resolution failures?

If your MX record queries fail with SERVFAIL in AWS VPC, Route 53 is likely the resolver—but only if it’s correctly configured. You’re seeing SERVFAIL when Route 53 can’t reach the target DNS server, either because a private hosted zone isn’t associated with the VPC, a resolver rule is misconfigured, or public DNS traffic is blocked. Let’s walk through where things go wrong and how to fix them.

Private hosted zones must be properly associated with your VPC

If you’re resolving internal domains with MX records, your private hosted zone must be associated with the correct VPC. Without this, queries for internal email domains time out or return SERVFAIL. You can verify associations in the Route 53 console under "Hosted Zones" → "VPC Associations."

Also, make sure any resolver rules directing queries to your private zone are set up and not overridden by rules for public DNS. Misconfigured rules can accidentally route internal queries outside the VPC, causing timeouts.

Public DNS traffic must not be blocked by VPC security policies

When resolving public MX records (like Gmail’s), your VPC must allow outbound DNS traffic (port 53, UDP/TCP) to public resolvers. If network ACLs or security groups block this, you’ll get SERVFAIL—even if the MX record exists. This commonly happens when rules deny all outbound traffic by default.

Verify that your VPC's outbound rules allow DNS traffic to public IP ranges, including those used by AWS's public DNS servers or third-party resolvers like Google (8.8.8.8). You can test this with dig or nslookup from an instance inside the VPC.

For more on DNS security and validation, the IETF’s DNS Security Extensions (DNSSEC) guide explains how resolution failures can stem from validation chains, though most SERVFAILs in VPCs arise from policy, not validation.

When validating email addresses, even minor DNS misconfigurations can derail deliverability. For accurate email list validation—avoiding false positives from misrouted DNS checks—consider tools like bulk verification that rely on real, up-to-date DNS resolution to catch invalid or catch-all addresses early.

When can MX resolution fail due to third-party DNS or ISP policies?

MX resolution can fail with SERVFAIL when your VPC’s DNS resolver is blocked or rate-limited by public DNS providers or ISPs that restrict queries for email domains like .gmail.com or .outlook.com. Many such providers throttle or outright reject DNS lookups for common mail services, especially if they detect high volume or suspicious patterns. This is especially common with consumer-grade or regional DNS resolvers, which may not be reliable for email infrastructure testing. You can test this by switching to public, well-known resolvers like Google’s 8.8.8.8 or Cloudflare’s 1.1.1.1—though these shouldn’t be used in production unless properly validated.

How public and ISP DNS servers affect MX lookups

Public DNS services like OpenDNS, Comcast’s DNS, or various mobile carrier resolvers often implement policies to reduce spam, abuse, or botnet traffic. These policies can include blocking or rate-limiting DNS queries for well-known email domains, especially those associated with high-volume messaging. When your AWS VPC uses default DNS settings (like Amazon’s DNS resolver), it may route queries through these restricted resolvers, leading to inconsistent or failed MX resolution.

This is not an AWS issue per se—it's a network-layer policy. For example, some ISPs have historically blocked or slowed down DNS lookups for mail servers during peak spam periods. You can verify this behavior using tools like Google Public DNS or Cloudflare’s 1.1.1.1, both of which are known for consistent, high-performance DNS resolution. If your MX lookup succeeds there but fails in your VPC, the root issue likely lies in your resolver's policy.

Testing vs. production: what to do next

Use public resolvers for troubleshooting and validation. Running dig or nslookup against 8.8.8.8 or 1.1.1.1 helps isolate whether the problem is your resolver or the DNS itself. But keep in mind: you should never rely on public DNS in production environments without ensuring the resolver is authoritative, stable, and compliant with your security and compliance standards.

For deeper DNS health checks, especially when configuring email infrastructure, consider validating your entire email delivery stack—including DNS records, SPF, DKIM, and DMARC—through tools that simulate inbox placement. You can test how well your domain’s email infrastructure performs in real-world conditions with an inbox placement test, available at inbox placement testing. This goes beyond MX resolution and ensures your messages land in inboxes, not spam folders.

How does this affect email deliverability and sender reputation?

If your AWS VPC can’t resolve MX records due to SERVFAIL, your outbound emails fail immediately during SMTP handshake—no delivery, no retry, no inbox. Even if the email address is valid, the failure occurs at the earliest stage of sending, triggering a bounce or soft-fail from your mail server. Repeated failures like this can get logged by ISPs and reputation systems, indirectly hurting your sender reputation over time, especially if they’re tied to your IP or domain.

SMTP Sessions Fail Before Transmission

You can’t send email if the receiving system’s MX record won’t resolve. The SMTP handshake relies on DNS resolution to find the correct mail server. If your VPC’s DNS query returns SERVFAIL, the connection never starts. That means no message is transmitted, no delivery report is generated, and your sending system marks the address as undeliverable—regardless of whether the email is valid.

Reputation Risks From Repeated Failures

While MX resolution failures themselves don’t directly lower your sender score, repeated ones are signs of infrastructure issues. ISPs and anti-abuse services watch for patterns: if your domain consistently fails to resolve MX records for valid domains, it raises red flags about your sending environment’s reliability. This isn’t about the email content—it’s about your network’s behavior. In some cases, systems like Spamhaus or AbuseIPDB may flag IP ranges with high DNS failure rates.

Even a single failed MX resolution can result in a hard bounce at the mail transfer stage. Many sending platforms, including AWS SES, report this as a “non-deliverable” or “permanent failure.” If your list includes addresses from domains with misconfigured DNS, you’ll see a spike in failed deliveries, which impacts your overall send rate and can trigger throttling by providers like Gmail or Outlook.

Let’s be clear: you can’t fix deliverability if the mail server never gets contacted. That’s why validating your email list *before* sending—especially when using AWS or other cloud environments—is critical. Tools like bulk email verification catch invalid or unresolvable addresses before they hit your sending pipeline. This reduces bounce rates and protects your domain reputation.

For real-time validation, you can also use the email verification API to test addresses as they enter your system. It checks MX records, syntax, and domain health—including whether a domain responds correctly to DNS queries. This aligns with industry standards: RFC 5321 specifies that proper MX resolution is required before an SMTP session can begin.

How to use Emaillistchecker.io to validate email addresses before DNS issues impact deliverability?

You can prevent delivery failures caused by DNS problems like SERVFAIL in AWS VPC by verifying email addresses in advance. Emaillistchecker.io's real-time API and bulk verification tools check validity, catch-all status, and risk flags before you send, reducing the chance that flawed or unresolvable domains derail your campaigns. This proactive step avoids wasted sends and protects sender reputation.

Pre-send validation with the real-time API

Let’s say you’re sending a campaign from an AWS-hosted service. If your list includes addresses with broken MX records or transient DNS failures, your messages will bounce or be rejected. The real-time verification API at Emaillistchecker.io/api checks each address against actual mail server responses, including MX resolution, during the verification process. It tells you upfront if an address is valid, a catch-all, or risky — before any delivery attempt.

Bulk verification as a DNS risk screen

Bulk list verification, available at Emaillistchecker.io/bulk-verification, runs these checks across entire mailing lists. If a domain consistently returns SERVFAIL or lacks MX records, the tool flags it as problematic. Since these anomalies are often linked to misconfigured DNS zones or out-of-service domains, filtering them out early preserves your sender reputation and keeps bounce rates low. According to RFC 5321, the SMTP protocol relies on correct DNS resolution for delivery — and when it fails, delivery stops.

With a 98.9% accuracy rate, Emaillistchecker.io prioritizes reliable results. This includes detecting domains where MX records are temporarily unreachable or where DNS responses are unreliable — common issues in complex AWS VPC environments. By filtering these addresses before sending, you avoid the downstream consequences of failed deliverability, including blacklisting and poor inbox placement.

Even if your infrastructure is sound, third-party domains can still fail due to external DNS issues. Verifying your list ensures you’re not wasting resources on addresses beyond your control. The goal isn't to fix DNS misconfigurations in other domains — it’s to identify them and exclude them from your send. This is part of a disciplined deliverability strategy that focuses on what you can influence.

Can you verify domain-level DNS records like MX using external tools?

Yes — you can verify MX records from outside your AWS VPC using global DNS tools like MxToolbox or Digicert’s DNS checker. These tools query your domain’s DNS from multiple geographic locations and can show whether your MX record is publicly resolvable and correctly configured. If the record resolves externally, the issue is likely within your VPC’s DNS resolution path, not your domain’s configuration.

Why external validation matters

When you encounter SERVFAIL during MX record resolution in AWS VPC, it’s easy to assume the domain is misconfigured. But if the same record resolves without error from external sources, the problem is isolated to your VPC’s DNS behavior — not the domain. This distinction keeps troubleshooting focused and prevents wasted time on upstream fixes.

For example, AWS Route 53 Resolver uses specific DNS resolvers by default. If you're pointing to a custom resolver or have a misconfigured VPC endpoint, your internal queries may fail even when public DNS is correct. External tools confirm the baseline: that your domain’s DNS is set up properly for the internet at large.

How to use these tools effectively

Go to MxToolbox.com or Digicert’s DNS checker, enter your domain, and select the MX record lookup. The result will show whether the record is present, properly formatted, and resolves from multiple locations. If it fails globally, your DNS is misconfigured — check TTL, syntax, or delegation. If it passes externally, the issue is internal to your AWS environment.

These checks are fast, free, and don’t require API access or installation. They’re an indispensable first step in any DNS troubleshooting flow.

For deeper validation, consider testing with tools that simulate different public DNS providers, such as DNSLeakTest or Google Public DNS. If your MX record resolves through those but not through your VPC, you’ve confirmed a routing or resolver issue.

Once you’ve confirmed domain-level DNS is healthy, you can focus on VPC-specific settings — like inbound/outbound rules, VPC endpoints for Route 53, or custom resolver configurations. Tools like bulk email verification can later help test deliverability once the network layer is resolved, ensuring that your outbound mail flows correctly after DNS is fixed.

What are the most common root causes of SERVFAIL for MX records in AWS VPC?

Missing or misconfigured outbound firewall rules that block port 53 are a frequent cause of SERVFAIL. Without open access to DNS resolvers, queries for MX records fail silently.

Root causes and their impact

  • Missing or incorrect VPC endpoint for Route 53 Resolver — If the resolver endpoint isn't correctly configured or attached to the subnet, private DNS queries cannot resolve.
  • Disabled DNS support in VPC settings — Disabling DNS resolution in the VPC prevents all internal DNS lookups, including MX record resolution.
  • Resolver conflicts with private hosted zones — When private hosted zones are misconfigured, they may intercept public MX queries, leading to inconsistent or failed responses.
  • High latency or route misconfiguration — If the network path to Route 53 Resolver is routed through an incorrect gateway, DNS queries time out, resulting in SERVFAIL.

Each of these issues disrupts the chain of DNS resolution. They’re not mutually exclusive — multiple failures often compound, making troubleshooting harder.

ItemDetails
Missing or incorrect VPC endpoint for Route 53 ResolverIf the resolver endpoint isn't correctly configured or attached to the subnet, private DNS queries cannot resolve.
Disabled DNS support in VPC settingsDisabling DNS resolution in the VPC prevents all internal DNS lookups, including MX record resolution.
Resolver conflicts with private hosted zonesWhen private hosted zones are misconfigured, they may intercept public MX queries, leading to inconsistent or failed responses.
High latency or route misconfigurationIf the network path to Route 53 Resolver is routed through an incorrect gateway, DNS queries time out, resulting in SERVFAIL.
The 4 items listed under “Root causes and their impact”, side by side.

Sources

  • Catch-all addresses made up 9% of all emails checked in 2025 — over 1 billion addresses that can look valid but still bounce and damage sender reputation. — ZeroBounce Email List Decay Report (2025)
  • A 2025 list quality analysis found 11.7% of emails are invalid and another 7.9% are risky (spam traps, disposable addresses), meaning 19.6% of a typical list can damage sender reputation. — Apollo.io sender reputation guide (2025)

Keep reading

Ready to put this into practice? Emaillistchecker.io verifies emails with 98.9% accuracy — start with 100 free verifications.

Frequently asked questions

What does SERVFAIL mean in DNS resolution?

SERVFAIL indicates a DNS server failure — the server could not process the query due to a configuration, network, or policy issue.

Can AWS VPC block MX record resolution?

Yes. By default, AWS VPC restricts outbound DNS traffic. If DNS resolution isn't properly configured, MX records cannot be resolved.

How do I enable DNS in my AWS VPC?

Go to the VPC settings in the AWS Console, ensure both 'enableDnsSupport' and 'enableDnsHostnames' are set to true.

Should I use public DNS servers in AWS VPC?

No. Public DNS servers are not recommended for production. Use Amazon Route 53 Resolver endpoints or private DNS with proper VPC associations.

Can a catch-all email address cause SERVFAIL?

No — catch-all addresses don’t cause SERVFAIL. SERVFAIL is a DNS resolution failure before any email transaction begins.

How do I test MX records from within a VPC?

Use `dig +short MX example.com` from an EC2 instance in the same VPC subnet to test MX resolution in context.

Does Emaillistchecker.io verify DNS records?

Yes — its real-time API checks email validity and can detect issues like catch-all or unresolvable domains during verification.

Can Emaillistchecker.io help reduce bounce rates from DNS failures?

Yes — by identifying invalid, risky, or catch-all emails before sending, it reduces the chance of undelivered messages due to DNS or delivery issues.

Why is my email failing to send even though the address is valid?

Even valid addresses can fail if their domain’s MX records cannot be resolved due to VPC, DNS, or network configuration issues.

What’s the best way to troubleshoot DNS issues in AWS VPC?

Use `dig`, `nslookup`, and VPC Flow Logs. Check VPC DNS settings, security groups, and ensure Route 53 Resolver endpoints are properly configured.

Do MX record failures affect sender reputation?

They don’t directly harm reputation, but repeated delivery failures due to resolution issues can be flagged by ISPs, indirectly degrading sender reputation.

Can Emaillistchecker.io be integrated with SendGrid or Mailchimp?

Yes — Emaillistchecker.io integrates with SendGrid, Mailchimp, Klaviyo, and HubSpot to verify and clean email lists before campaigns.