systemd.rr(5) — Linux manual page

NAME | SYNOPSIS | DESCRIPTION | EXAMPLES | SEE ALSO | COLOPHON

SYSTEMD.RR(5)                   systemd.rr                  SYSTEMD.RR(5)

NAME         top

       systemd.rr - Local static DNS resource record definitions

SYNOPSIS         top

           /etc/systemd/resolve/static.d/*.rr
           /run/systemd/resolve/static.d/*.rr
           /usr/local/lib/systemd/resolve/static.d/*.rr
           /usr/lib/systemd/resolve/static.d/*.rr

DESCRIPTION         top

       *.rr files may be used to define resource record sets ("RRsets")
       that shall be resolvable locally, similar in style to address
       records defined by /etc/hosts (see hosts(5) for details). These
       files are read by systemd-resolved.service(8), and are used to
       synthesize local responses to local queries matching the defined
       resource record set.

       These drop-in files are in JSON format. Each file may either
       contain a single top-level DNS RR object, or an array of one or
       more DNS RR objects. Each RR object has at least a "key" subobject
       consisting of a "name" string field and a "type" integer field
       (which contains the RR type in numeric form). Depending on the
       chosen type the RR object also has the following fields:

       •   For A/AAAA RRs, the RR object should have an "address" field
           set to either an IP address formatted as string, or an array
           consisting of 4 or 16 8-bit unsigned integers for the IP
           address.

       •   For PTR/NS/CNAME/DNAME RRs, the RR object should have a "name"
           field set to the name the record shall point to.

       This JSON serialization of DNS RRs matches the one returned by
       resolvectl.

       Currently no other RR types are supported.

EXAMPLES         top

       Example 1. Simple A Record

       To make local address lookups for "foobar.example.com" resolve to
       the 192.168.100.1 IPv4 address, create
       /run/systemd/resolve/static.d/foobar_example_com.rr:

           {
                   "key" : {
                           "type" : 1,
                           "name" : "foobar.example.com"
                   },
                   "address" : [ 192, 168, 100, 1 ]
           }

SEE ALSO         top

       systemd(1), systemd-resolved.service(8), resolved.conf(5),
       hosts(5), resolvectl(1)

COLOPHON         top

       This page is part of the systemd (systemd system and service
       manager) project.  Information about the project can be found at
       ⟨http://www.freedesktop.org/wiki/Software/systemd⟩.  If you have a
       bug report for this manual page, see
       ⟨http://www.freedesktop.org/wiki/Software/systemd/#bugreports⟩.
       This page was obtained from the project's upstream Git repository
       ⟨https://github.com/systemd/systemd.git⟩ on 2026-05-24.  (At that
       time, the date of the most recent commit that was found in the
       repository was 2026-05-24.)  If you discover any rendering
       problems in this HTML version of the page, or you believe there is
       a better or more up-to-date source for the page, or you have
       corrections or improvements to the information in this COLOPHON
       (which is not part of the original manual page), send a mail to
       man-pages@man7.org

systemd 261~rc1                                             SYSTEMD.RR(5)

Pages that refer to this page: resolved.conf(5)systemd.directives(7)systemd.index(7)systemd-resolved.service(8)