What are wildcard subdomains?

This article explains wildcard subdomains and their intended functions. 

What is a wildcard subdomain?

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! A2 Hosting’s KB 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, there are a wealth of resources to consult. Our knowledge base offers a wide variety of articles on domains. If you still haven’t hit the nail on the head, contact A2 Hosting’s customer support LiveChat, call us or submit a customer support ticket,  where a customer support representative will be able to lend further guidance on resolving the situation.

Did you find this article helpful? Then you'll love our support. Experience the A2 Hosting difference today and get a pre-secured, pre-optimized website. Check out our web hosting plans today.

We use cookies to personalize the website for you and to analyze the use of our website. You consent to this by clicking on "I consent" or by continuing your use of this website. Further information about cookies can be found in our Privacy Policy.