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:
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:
This equates to [anything valid characters].mydomain.com
So, if someone were to browse to firstname.lastname@example.org 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.
Under the Domains section of cPanel, click on the Subdomains icon.
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.