How to create a wildcard sub-domian?

I am trying to install Wordpress MultiSite and in order to do so it says to create a wildcard sub-domain. How, or can, I do this in Virtualmin? If not, can someone help with setting it up in Apache? I’m not exactly sure where/how to do it. The documentation from wordpress is vague:

I’ve found some blogs that say you only need to create a virtual domain in cPanel (I’ve read here about the difference between Virtualmin’s sub-server and cPanel’s sub-domain, but I’m getting confused with all the nomenclature). I’ve noticed mutiple VirtualHosts in Apache that are related to my Top-level Server and the sub-servers related to it, but I’m unsure where to stick the wildcard sub-domain. For reference, I have:
and so forth

So now I need a wildcard sub-domain.

Below is the step that talks about setting up the wild card domain in the wordpress documentation:

Step 2: Setting Wildcard Subdomains
(If this is a Sub-directories Install, skip this step.)

Sub-domain sites work with the use of wildcard subdomains. This is a two-step process:

  1. Apache must be configured to accept wildcards.
    Open up the httpd.conf file or the include file containing the VHOST entry for your web account.
    Add this line:
    ServerAlias *
  2. In the DNS records on your server, add a wildcard subdomain that points to the main installation. It should look like:
    A *

Any ideas?

Yep, an idea would be to check out the function Server Configuration -> Website Options : Website matches all sub-domains. That should do it. :slight_smile:

When this option is enabled, requests for any URL under the domain (like will return the virtual server’s website. This can be useful if you host an application that can return different content based on the requested domain name, such as Wordpress MU. If the virtual server’s DNS domain is hosted on this system, Virtualmin will also add the wildcard * DNS record when Yes is selected.

Thanks Locutus. That’s what I was looking for. Fortunately I figured it out last night and changed it through httpd.conf, but I forgot to update this. I just looked at the website options in Virtualmin and sure enough the change in apache’s httpd.conf is reflected in the “Website matches all sub-domains?” option.