Spring Fresh Sale! - Up To 67% OFF BDIX Hosting + Free Domain
DNS

How to Set Up a Wildcard DNS Record in cPanel

A wildcard DNS record is a catch-all: instead of creating a record for blog.yourdomain.com, shop.yourdomain.com and every other subdomain one by one, a single wildcard sends any subdomain to the same destination. It is written with an asterisk — *.yourdomain.com.

This is handy for apps that generate subdomains on the fly, or when you simply want everything to resolve without maintaining a long list.

When a wildcard makes sense

  • Multi-tenant apps that give each customer their own subdomain.
  • Catching typos so stray subdomains still land on your site.
  • Wildcard SSL setups where one certificate covers all subdomains.

Step 1: Open the Zone Editor

  1. Log in to cPanel.
  2. Under Domains, open Zone Editor and click Manage next to your domain.

Step 2: Add the wildcard record

Decide whether you want the wildcard to point at an IP address (an A record) or another hostname (a CNAME).

  1. Click + Add Record.
  2. For an A record: set Name to *, Type to A, and Record to your server's IP address.
  3. For a CNAME: set Name to *, Type to CNAME, and point it at your target hostname.
  4. Click Save Record.

Not sure which to use? Our guides on creating an A record and creating a CNAME record explain the difference.

Step 3: Test it

After a short wait for DNS propagation, type any made-up subdomain into your browser — say anything.yourdomain.com. It should now resolve to your wildcard target.

Frequently asked questions

Will a wildcard override my existing subdomains?

No. Specific records always win. If you have an explicit record for shop.yourdomain.com, that is used; the wildcard only catches subdomains that have no record of their own.

Do I still need to create the subdomain in cPanel?

For the web server to actually serve content, yes — the DNS wildcard resolves the name, but cPanel needs a matching subdomain (or a wildcard subdomain document root) to display a site. See creating a subdomain in cPanel.

Can I get one SSL certificate for all subdomains?

Yes, a wildcard SSL certificate secures *.yourdomain.com. If you need one, open a support ticket and we will help.

Was this article helpful?