Find answers to your questions

Documentation

Configure wildcard subdomains: DNS, hosting and HTTPS

A wildcard subdomain lets DNS answer for multiple names without creating a separate record for each one. For example, *.example.com can support an application with several workspaces. Use this for a defined requirement: it does not automatically redirect visitors or make every address work over HTTPS.

Define the names and expected behavior

For a few known subdomains, individual records are often easier to control. Before using a wildcard, identify the allowed names, the website or application to display, and what should happen for an unknown name. The application must recognize incoming names and reject those that do not match an authorized workspace.

A DNS wildcard does not replace the record for the main domain, example.com. Existing names, delegations and the zone structure limit where it applies. It can also answer for some deeper names, so do not assume that it always covers only one level. Check Cloudflare’s DNS wildcard rules if that provider manages your zone.

Prepare the destination in cPanel

  1. Confirm the hosting account and retain its current settings. Check that your service and application support the intended setup.
  2. If available, open Domains, then Create A New Domain, and enter *.example.com, replacing the example domain.
  3. Select the document root for the intended content. Sharing the main website’s directory can expose that same website under other names. An application may require additional web-server or routing configuration.

Available options depend on your account. If the name is rejected or the destination is unclear, have the configuration checked before proceeding. The official cPanel procedure describes creation through the current interface.

Update the authoritative DNS zone

Make the change with the provider that actually hosts your DNS. A record added in cPanel will not be used publicly when another provider is authoritative. Retain the previous values and email records, then check the complete record name before saving.

  • A: a confirmed IPv4 address for the service.
  • AAAA: an IPv6 address only when the service actually supports it.
  • CNAME: a target hostname, without https:// or a path. It is not an HTTP redirect and must not coexist with other record data at the same name.

Use our guide to identify your hosting address, rather than copying an example address or your own Internet connection’s IP. The name to enter, often * or *.example.com, depends on the DNS editor.

Check HTTPS and the website separately

A certificate for *.example.com covers names such as app.example.com, but by itself covers neither example.com nor a.app.example.com. This TLS rule differs from DNS wildcards. With Let’s Encrypt, a wildcard certificate requires DNS-01 validation. Automatic issuance and renewal depend on the available integration. If you use a proxy, also check its HTTPS connection to the origin server.

After DNS caches update, test the intended names, an unknown name, content, application sign-in and the certificate. A correct DNS answer does not prove that the website works. Avoid a universal landing page that unintentionally publishes the same content under unwanted names.

To validate routing, HTTPS coverage or an application with multiple workspaces, contact Nuagerie with the affected names and expected behavior. Do not send passwords or DNS tokens.

Related Articles

How to clear your computer’s DNS cache The DNS cache temporarily stores answers that connect domain names with network addresses. Clearing it can help when one device retains an old answer after a DNS change. It is not a general fix for HTTP 404 errors, expired certificates or a website outage. Check before changing anythingRecord the exact address and... Redirect a domain or page with cPanel An HTTP redirect sends visitors from one web address to another. It is useful for a moved page, a domain change or a short address. It transfers neither website files nor email accounts. A CNAME record serves a different purpose: it links names in DNS. Prepare the source and destinationThe destination must already... Understand domains, aliases and subdomains A domain name can serve a website, email addresses and other services. Before adding it to your hosting account, decide what you want to connect: a new website, another address for the same website or a subdomain. Registration, DNS and hosting have different roles Domain registration: this concerns the name itself,... Choose your website’s main address: with or without www Your website may be reachable with or without www, over HTTP or HTTPS. Choosing a consistent main address simplifies links, tracking and navigation. Each alternative address should lead to the right page at the chosen HTTPS address. Choose an address that fits your siteUsing www does not, by itself, provide a... How to Create and Use Subdomains Subdomains Subdomains allow you to separate your website into several distinct sections. Subdomains will look like this: subdomain.yourdomain.com, where subdomain is the name of the subdomain, and yourdomain is your domain name. Examples Here are some common subdomains: http://forum.yourdomain.com (used for the...