Wildcard DNS Setup For Kloxo

I usually do not tend to write techie stuff due to the type of readers I have on here, but in this case I’m going to make an exception as I tried to do this but couldn’t find any reasonable help on the internet.

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, but I had to quickly write this post instead of continuing with my work for many of the users who may be having same problem.

Here’s how I did it, very simple and straight forward:

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 “” in a text editor and make the following changes:

ServerAlias *
DocumentRoot /home/username/
DirectoryIndex index.php index.html index.shtml index.htm default.htm Default.aspx Default.asp
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 “” 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?

You may also like
Top 7 Google Adsense WordPress Plugins
4 Basic Tips I Used To Increase My Google Adsense Clickthrough Rate
  • Jan 5,2015 at 12:50 am

    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’);

  • Nov 12,2014 at 12:23 pm

    Thanks, it’s 100% worked in my vps :)

  • Nassim
    Jun 15,2012 at 2:36 pm

    thanks , it’s very usefull trick !

  • Jul 9,2011 at 10:41 pm

    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.

    • a7md
      May 10,2012 at 2:51 am

      i have this problem :(

    • Jun 21,2012 at 2:14 pm

      I have the same problem. It just says ” Alert: invalid_subdomain”

  • Khajonsak Sripuna
    Mar 21,2011 at 12:30 pm

    Thanks thank

  • Jack Arson
    Mar 15,2011 at 1:13 pm

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

Leave Your Comment

Your Comment*

Your Name*
Your Webpage