Add to Favourites Add to Favourites    Print this Article Print this Article

How to prevent the creation of domains with certain characters

Update Feb 2018
New directadmin.conf option to block special characters:

Although the proper fix for this issue will be to implement punycode for IDNs, that's a larger project for the future.
The reason for the issue is a change in the policy bind uses for approved domain names.
It was allowed in the past, hence DA allows them, but since domains were already created with those characters, DA cannot simply disallow them, else live domains will become broken.

In any case, to prevent future domains from being created with those characters, create the script:


and add the code

$domain = getenv("domain");

if (strpos($domain, 'é') !== false)
   echo "Domain must not contain the character é\n";
if (strpos($domain, 'à') !== false)
   echo "Domain must not contain the character à\n";


and chmod the script to 755.

If you need to add an IDN to DA, add the punycode value instead, so it doesn't hurt named:

Was this answer helpful?

Also Read