Expressions¶
Expressions are fundamental to rexdns functionality in CoreDNS, so they are important to cover before proceeding.
Expressions use a basic syntax similar in some ways to regular expressions. The available components of an expression are:
Wildcard matching with the
*character, which can match any text, including nothing at all.Bracketed sets with comma-separated values, such as
[com, net, org].Identifiers, which are single words per part, such as
example.
Putting these concepts together, the following examples demonstrate a small sample of possible expressions:
*.example.comMatches any host or subdomain under
example.com.www.*.comMatches any domain with a
wwwhostname under thecomtop-level domain.www.example.[com,net,org].Matches any of
www.example.com,www.example.net, orwww.example.org.www.example.comMatches
www.example.comexactly.