Web Hosting

Please find below our list of Web Hosting guides to help with your hosting account.

How to create wildcard sub-domains

This article was posted in: Web Hosting

Wildcard subdomains are sometimes necessary to enable some web applications to work correctly, for example, WordPress Multi User (WPMU)

A domain is something like mydomain.com - you are probably familiar with the idea of domains already. A subdomain is simply a further level of subordinate hierarchy. To explain this by example:

  • www.mydomain.com
  • webmail.mydomain.com
  • secure.mydomain.com
  • anything-else-you-like-within-63-characters.mydomain.com

These are all subdomains of mydomain.com

However, let's suppose you wanted your website to respond to several dozen subdomains (or more!). It would be tiresome to have to manually add each subdomain manually, and so the idea of a wildcard subdomain becomes relevant. In this case, we simply define a single subdomain entry:

*.mydomain.com

This equates to [anything valid characters].mydomain.com

So, if someone were to browse to thesoundofonehandclapping@mydomain.com it would still open your website - neat, huh?

This article will show you how to create a wildcard subdomain in your Krystal cPanel account. This article assumes that you are already successfully logged into cPanel.


Step 1

Under the Domains section of cPanel, click on the Subdomains icon.


Step 2

On the Subdomains screen you will find the Create a Subdomain section. Just enter an asterisk * in the Subdomain text box, and select the parent domain from the adjacent drop down control (krystaldemo.co.uk in our example).

The Document Root should reflect the path to your "catch all" website from your home directory. You can point this at your main public_html directory if you wish, or to another directory, depending on where you have physically installed your website. In our example, our website is installed in public_html/wpmu but it could be called anything you like.

When you are happy with the settings, click the Create button.