NAPTR Record

Naming Authority Pointer

Type code
35
Status
In use
Defined in
RFC 3403

What the NAPTR record is for

NAPTR is the DNS database for the Dynamic Delegation Discovery System (DDDS). Each record holds a rule that either rewrites the query with a regular expression or replaces it with another domain name, plus flags that say whether the lookup is finished.

SIP uses NAPTR (RFC 3263) to find out which transports a domain supports, with records pointing at the matching SRV names. ENUM (RFC 6116) uses NAPTR under e164.arpa to map telephone numbers to URIs such as sip: or tel:.

Clients process records in ORDER, lowest first, and use PREFERENCE to choose among records with the same ORDER.

Wire format and fields

FieldSizeMeaning
ORDER16 bitsThe order in which records must be processed, lowest first.
PREFERENCE16 bitsThe preference among records with equal ORDER, lowest first.
FLAGScharacter-stringFlags controlling the rewrite, such as "s", "a", "u" or "p".
SERVICEScharacter-stringThe services available down this path, such as "SIP+D2T" or "E2U+sip".
REGEXPcharacter-stringA substitution expression applied to the original string.
REPLACEMENTdomain nameThe next domain name to query, or "." when REGEXP is used.

Zone file syntax

<owner> <ttl> IN NAPTR <order> <preference> "<flags>" "<services>" "<regexp>" <replacement>

Example

The NAPTR records at sip2sip.info, fetched from live DNS on 27 November 2026:

sip2sip.info. 300 IN NAPTR 20 100 "s" "SIP+D2U" "" _sip._udp.sip2sip.info.
sip2sip.info. 600 IN NAPTR 5 100 "s" "SIPS+D2T" "" _sips._tcp.sip2sip.info.
sip2sip.info. 3600 IN NAPTR 10 100 "s" "SIP+D2T" "" _sip._tcp.sip2sip.info.

Common mistakes

  • Setting both REGEXP and REPLACEMENT in one record. RFC 3403 says only one may be used; the other must be empty ("" or ".").
  • Escaping backslashes in REGEXP only once in a zone file. The zone file parser consumes one level, so \1 has to be written as \\1.
  • Mixing up ORDER and PREFERENCE. Records with a lower ORDER are always processed first; PREFERENCE only breaks ties.
  • Using an "s" flag on a record whose replacement has no SRV records, or "a" where there are no A/AAAA records, so the lookup ends at nothing.

Specifications

  • RFC 3403: Dynamic Delegation Discovery System (DDDS) Part Three: The Domain Name System (DNS) Database
  • RFC 3263: Session Initiation Protocol (SIP): Locating SIP Servers (Uses NAPTR to choose a SIP transport before the SRV lookup.)
  • RFC 6116: The E.164 to Uniform Resource Identifiers (URI) Dynamic Delegation Discovery System (DDDS) Application (ENUM) (Uses NAPTR under e164.arpa to map telephone numbers to URIs.)
  • IANA DNS Resource Record (RR) TYPEs registry: type code and status

Related record types

Domain Intelligence APIs

Get started with our easy-to-use API docs.