What Are Wildcard Subdomains?

A wildcard DNS record allows you to point all existing and non-existing subdomains to a specific area. For example, www.example.com and test.example.com would both direct to www.example.com when a wildcard subdomain is enabled.

If your main domain is example.com, then the wildcard subdomain will be *.example.com.

What function does a wildcard subdomain serve? #

A wildcard subdomain is particularly useful if you desire subdomains to display whatever you set as the document root (a designated folder that stores web pages.) Typically, most wildcards are set to the site’s homepage out of preference. This should be specified when creating the wildcard subdomain. cPanel does not set the site’s homepage as the default but instead utilizes wildcard.domain as the defacto root of the wildcard. WordPress and other CMS will often respond unpredictably when accessed via a URL other than what is in their setup, so it is important to use caution when configuring the domain.

Wildcard domains are particularly useful for some multisite web applications that require the use of wildcard subdomains, as well as avoiding propagation delays. When utilizing wildcard domains to avoid propagation delays, the wildcard is set directly in DNS with no document root. Any added subdomains will then resolve immediately.

How do you set up a wildcard subdomain? #

Creating a wildcard subdomain is a relatively simple process! Heaven Hoster’s Docs article on the subject will walk you through the process. Essentially, it’s as easy as placing “*” in the right text field while configuring a domain in cPanel.

Having issues setting up your wildcard subdomain? #

If you’re having issues with configuring your wildcard subdomain, We’re happy to help you 24/7.