How to create Wildcard subdomain

Updated on 26-Nov-2021 in Domains
793

Some of the applications require dynamic subdomains, where the content delivery is managed by the application code based on the URL. Such a scenario can be handled  by creating wildcard subdomain, this means any value of the subdomain accessed on the browser will route to a specific location / IP specified.

Here is how you can create a wildcard subdomain in cPanel (same can be achieved on other DNS providers if the domain is managed elsewhere).

How to create a Wildcard subdomain

  • Login to cPanel
  • Go to Zone Editor (DNS management incase managed elsewhere)
  • Create an A record with the following
    • *.yourdomain.com (use your own domain name)
    • Select record type as ‘A’ record from dropdown / option
    • Type in the IP where you want to route all your subdomains

If you want to know how to set an A record, check zone editor guide.

Published by:

Easyhost Team

3 rated the article helpful.

Was this article helpful for you?

Yes No