Regular Expressions plug-in

This plug-in uses Regular Expressions (see standard syntax in Wikipedia) to pair host domain names to IP addresses.
This gives you much more flexibility than simple wildcard records.

Here is a simple example:

This will cause requests for anything under "" starting with "asia" to resolve to IP
That would include for example "".

Requests for "europe..." resolve to, requests for "america..." resolve to, and anything else under "" resolves to

Regular expressions are compiled when the server modules loads them and therefore run very efficiently in Simple DNS Plus.

NOTE: Keep in mind that the dot (.) character has special meaning in regular expressions (matches any character), so when matching multi-segment domains names, the domain name dots must be enclosed in square brackets [.].
For example to match exactly "", the regular expression would be "^something[.]example[.]com$" without the quotes.
The regular expression equivalent to the wildcard record name "*" is ".*[.]example[.]com$".

Where to get this plug-in

This plug-in is automatically included when you install Simple DNS Plus using the "Full" installation option.

For details on setting up an instance of the plug-in click here.

This plug-in is released into the public domain as open source. You are most welcome to fork it or contribute code enhancements, and / or use the source code as a starting point for developing your own plug-in.

Source code / Git repository:

Related KB articles:

Be the first to comment on this page:
(Never published. Used for replies and to show your Gravatar icon. Never used for any other purpose.)