Back to DNS Record Types

NAPTR Naming Authority Pointer Common

Rewrites a name into another name or URI using regex-based rules, commonly used in SIP and ENUM telephony systems.

What it's for

A NAPTR (Naming Authority Pointer) record uses regular-expression-based rewrite rules to transform a lookup key into another domain name, URI, or a pointer to a further lookup (often an SRV record). It's more abstract and less commonly encountered than most DNS record types — its main real-world home is telephony and SIP infrastructure, particularly ENUM (mapping phone numbers to internet services via DNS) and SIP server discovery chains.

You'll rarely need to write one unless you're working with VoIP/SIP infrastructure or ENUM-based number-to-URI translation systems.

Format & syntax

example.com.    3600    IN    NAPTR    100 10 "S" "SIP+D2U" "" _sip._udp.example.com.
  • Order — determines processing order when multiple NAPTR records exist for a name; lower values are processed first
  • Preference — like weight/priority for records with the same order
  • Flags — a short string controlling what kind of lookup happens next: S (look up an SRV record), A (look up an A/AAAA record), U (the result is a terminal URI, stop here), or empty (continue with non-terminal rewriting)
  • Service — describes the service and protocol, e.g. SIP+D2U (SIP over UDP)
  • Regexp — an optional regex-based substitution rule for rewriting the original query into a new one
  • Replacement — the next domain name to query (often an SRV record name), or . if the regexp field alone produces the final result

How it's used in practice

  • SIP server discovery chains — NAPTR is often the first step in locating a SIP server: query NAPTR to find out which transport protocols are supported (UDP, TCP, TLS) and get pointed toward the corresponding SRV record, which then resolves to the actual server and port.
  • ENUM (E.164 Number Mapping) — converts telephone numbers (in E.164 format) into DNS-queryable names under a special zone, then uses NAPTR records to map that number to VoIP URIs, email addresses, or other contact methods — the technical basis for some carrier-grade and enterprise VoIP interconnect systems.
  • URN resolution — historically proposed for resolving URNs (Uniform Resource Names) into URLs, though this specific use case never saw broad adoption outside specialized systems.

Common mistakes & gotchas

  • Writing NAPTR without understanding the SIP/ENUM chain it feeds into — NAPTR records rarely stand alone; they're almost always one link in a chain that continues to SRV and then A/AAAA. Configuring NAPTR correctly requires understanding what the consuming system (a SIP PBX, a carrier ENUM gateway) actually expects at each step.
  • Malformed regex in the regexp field — the regex substitution syntax is unusual (delimiter-based, similar to sed) and easy to get wrong, silently breaking the rewrite chain for any client that depends on it.
  • Confusing NAPTR flags — using U (terminal URI) when the chain should continue to an SRV lookup, or vice versa, breaks the resolution chain at the wrong step.
  • Assuming NAPTR is commonly needed — for the overwhelming majority of web/API/general infrastructure work, you'll never touch a NAPTR record. It's worth recognizing what it is, but not something to reach for outside SIP/telephony contexts.

Comparison & FAQ

Type Purpose Key difference from NAPTR
SRV Direct service location (host, port, priority, weight) Simpler and more common; NAPTR often exists purely to route toward an SRV lookup
CNAME Simple 1:1 name aliasing No rewrite logic or regex — a pure static alias

What's the practical difference between NAPTR and SRV?

SRV directly tells a client which host and port to connect to for a service. NAPTR is a more general-purpose rewriting mechanism that's often used as a preceding step to figure out which SRV record to look up next, particularly in SIP and ENUM systems.

Do I need a NAPTR record for a typical website or API?

No — NAPTR is essentially exclusive to telephony/SIP and ENUM use cases. Standard web and API infrastructure never requires it.

What does the "flags" field in a NAPTR record control?

It tells the resolving client what kind of lookup to perform next: S for an SRV lookup, A for a direct address lookup, U if the record already produced a final URI, or blank to continue with further non-terminal NAPTR rewriting.

What is ENUM and how does it relate to NAPTR?

ENUM (E.164 Number Mapping) is a system for mapping telephone numbers into the DNS namespace so they can be resolved to internet-based contact methods (SIP URIs, email, etc.) using NAPTR records as the translation mechanism.