Tutorials - Creating a Regex Record
This tutorial will show you how to create an A Record that uses a regular expression to match a domain. Regular expressions matches are not a standard feature of DNS servers and is powerful feature of Refract DNS. Refract DNS uses .NET regular expressions which may different from other implementations of regular expressions.
Regular expressions give the user a lot more flexibility to match multiple domains that couldn't normally be matched using a Wildcard Record. For example we might have the following domains:
All these domains need to point at a single IP based on the fact that client1 appears in the domain. This cannot be achieved by using a wildcard because a wildcard must match a whole DNS label and not part of the the label. Instead the following regular expression can be used:
In this tutorial we will point the domains below at the IP address 127.0.0.1.