Wildcard DNS Setup For The Kloxo Hosting Panel

Wildcard DNS Setup For The Kloxo Hosting Panel

As most of you already know, kloxo is a free alternative to Cpanel and DirectAdmin hosting control panels, and I make use of it for most of my VPS hosting needs.

I needed to setup a wildcard dns for Kloxo to use with WordPress multisite for a project I’m working on, but sadly there wasn’t any readily help available, not even on the kloxo help forum.

After some tinkering I was able to solve this problem and have my setup working fine. Here’s a simple workaround:

First log on to your kloxo control panel, locate the “manage dns” option amongst the bunch of icons which you can find directly under the “domain adm” section. Open it up, and the first thing you want to do is switch to the domain you’re creating wildcard dns for via the “Switch to Another” drop down box. Then click on the “Add A” tab to add an A record. In the “Hostname” box, just enter *, in the “Value” box enter the IP address for your VPS or host, and then just click on the “Add” button.

As soon as you’re done with the above, log on to your Hypervm control panel, this is the easiest way I’ve found to do this. So login to your Hypervm, click on the “File Manager” icon, open the “home” folder, open the “httpd” folder, you’d be presented with a list of all the domain names in your account. Open up the one you’re creating wildcard for,then click to open the “conf” folder and then open “kloxo.yourdomain.com” in a text editor and make the following changes:

servername yourdomain.com
ServerAlias *.yourdomain.com
DocumentRoot /home/username/yourdomain.com/
DirectoryIndex index.php index.html index.shtml index.htm default.htm Default.aspx Default.asp index.pl
ScriptAlias /awstats/ /home/kloxo/httpd/awstats/wwwroot/cgi-bin/

SuexecUserGroup username username

Leave the rest portion of the file, save your changes.
Note: Change the IP address on line 2 above to your actual IP address and “yourdomain.com” to your domain name.

That’s it, save your changes, and go restart your apache. To do that, just go back to your hypervm home, click on the “Command Center” button, then enter the following code without quotes to restart apache: “/etc/rc.d/init.d/httpd restart” or “/etc/init.d/httpd -k restart”. You may also want to re-boot your vps too, I actually did but I don’t think it makes any difference.

If you’re using Cpanel or DirectAdmin hosting panels or you’re setting this up for wordpress multisite, follow the instructions on the WordPress Codex page.

I hope this helps?

  • Thanks, it really works and helped me a lot! I just followed your instructions and vuolia – wildcard DNS working on my VPS.

  • Great you did this, I have a problem when I enter the * in Kloxo it just says invalid domain every time and I can’t get past that part.

  • In case you facing error when adding (*) in the hostname field, and then you should edit dnsbaselib.php that located in /usr/local/lxlabs/kloxo/httpdocs/htmllib/lib/dns/dnsbaselib.php,

    Access your server through ftp program such filezilla, open dnsbaselib.php using text editor, I prefer to use notepad++ and remove below condition from line 104 or so. Before that, you should back up the original file, in case there are a mistake when deleting the line.

    // Validates subdomain
    if (!preg_match(“/^(([a-zA-Z]|[a-zA-Z][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z]|[A-Za-z][A-Za-z0-9\-]*[A-Za-z0-9])$/”, $param[‘hostname’])) {
    throw new lxexception(‘invalid_subdomain’, ‘hostname’);


  • Up Next:

    US Address Options For Nigerian Clickbank Affiliate Marketers

    US Address Options For Nigerian Clickbank Affiliate Marketers