A wildcard record matches every subdomain you haven't defined explicitly, so anything.yourdomain.com resolves to one place.
- Log in to cPanel and open Zone Editor.
- Click Manage next to
yourdomain.com, then + Add Record. - Set the Name to
*(an asterisk, which becomes*.yourdomain.com). - Choose type A and enter your server's IP, or type CNAME and enter a target hostname.
- Save the record.
To serve wildcard subdomains as websites too, you may also need a wildcard subdomain in cPanel Domains (*.yourdomain.com) and a wildcard SSL certificate for HTTPS. Explicit records always take priority over the wildcard. Need a wildcard SSL or help wiring it up? Open a ticket.