SUPPORT.TWILIO.COM END OF LIFE NOTICE: This site, support.twilio.com, is scheduled to go End of Life on February 27, 2024. All Twilio Support content has been migrated to help.twilio.com, where you can continue to find helpful Support articles, API docs, and Twilio blog content, and escalate your issues to our Support team. We encourage you to update your bookmarks and begin using the new site today for all your Twilio Support needs.

Incoming Message Webhook Errors: HTTP Bad Host Name, DNS Resolution Failures, and Error 11210

Issue

When using Twilio to receive incoming SMS or MMS messages, you may configure a webhook URL where Twilio will send HTTP requests containing message data. Occasionally, you might encounter errors such as:

  • HTTP bad host name
  • The DNS entry for the URL’s host cannot be resolved
  • Error 11210

These errors indicate that Twilio is unable to reach the webhook URL you have provided. This article explains what these errors mean, why they occur, and how you can resolve them.

 

Product

REST API and TwiML

 

Environment

legacy Twilio Console

 

Cause

When Twilio receives an incoming message for your phone number, it attempts to make an HTTP request to the webhook URL you’ve configured. If Twilio cannot resolve the hostname in your URL to a valid, public IP address, you’ll see errors like “HTTP bad host name” or “DNS entry for the URL’s host cannot be resolved.”

Common causes include:

  • The hostname is misspelled or incorrect.
  • The DNS record for the hostname does not exist or is not publicly accessible.
  • The URL references an internal or private network (e.g., internal.example.com or localhost), which Twilio cannot access from the public internet.
  • The DNS record has not yet propagated.

 

Resolution

Follow these steps to resolve the issue:

  1. Verify the Webhook URL

    • Double-check the URL you have configured for incoming messages in the Twilio Console.
    • Make sure there are no typos in the hostname.
  2. Check DNS Records

    • Use a public DNS lookup tool (such as Google Dig) to confirm that your hostname resolves to a public IP address.
    • If the DNS record is missing or incorrect, update your DNS provider’s settings.
  3. Ensure Public Accessibility

    • The webhook URL must be accessible from the public internet. Twilio cannot reach URLs that are only available on private networks, VPNs, or behind firewalls.
    • Avoid using hostnames like localhost127.0.0.1, or any internal-only domains.
  4. Wait for DNS Propagation

    • If you recently updated your DNS records, it may take some time for changes to propagate globally. This can take up to 48 hours in some cases.
  5. Test with a Public Endpoint

    • As a troubleshooting step, try setting your webhook to a known public endpoint (such as a request bin or a simple public server) to confirm that Twilio can reach it.

 

Example Scenario

Configured a webhook URL as https://example.com/reply. When Twilio attempted to send incoming message data, it returned the error “HTTP bad host name.” Investigation revealed that the hostname was not publicly accessible, resulting in DNS resolution failure.

Resolution
Update the DNS records and ensure the webhook server was accessible from the public internet. Once the DNS was properly configured and the server was reachable, Twilio was able to deliver incoming message requests successfully.class="notification"

 

Additional Information 

If you continue to experience issues after following these steps, review your DNS and server configuration, or consult your network administrator to ensure public accessibility.


 

Have more questions? Submit a request
Powered by Zendesk