Reverse MX Examples · Example 2 of 2 in Options

Adds subdomains with their own MX record on Cloudflare Email Routing: 2,777,768 records instead of 2,515,204, such as 0--o.cc.cd.

By default the API returns registrable domains only (type: 1). include_subdomains=true adds subdomains (type: 2) whose own MX record names the mail server.

The total grows from 2,515,204 to 2,777,768; the difference is subdomains. This example sorts by name (ordering=punycode), which puts a subdomain among the first records: 0--o.cc.cd (type: 2, a subdomain of cc.cd) between two registrable domains. Its subdomain object describes the label (0--o), and domain holds cc.cd.

In the response, look at result_count, results[].type, results[].subdomain and results[].dns.mx.mail_servers.

Request

What this example sends. Every parameter is documented on Reverse MX; the exact request is in the code panel.

ParameterValue
orderingquerypunycode
mxqueryroute1.mx.cloudflare.net
include_subdomainsquerytrue
page_sizequery25

Reference updated