What is a wildcard subdomain?
A domain is your website address, like example.com. A subdomain is a name added in front, like blog.example.com. A wildcard uses a star (*) to mean "anything". So *.example.com catches blog.example.com, shop.example.com and any other name, even ones you never made.
Why use it?
- Give every user of your app their own address, like
anna.example.com. - Catch typing mistakes and send them to your main site.
- Run many small sites from one set of files.
Steps in cPanel
cPanel is a popular control panel. Your plan may use a different one. Ask Hostvento support if you cannot find these menus.
- Log in to your hosting control panel.
- Open Domains or Subdomains.
- In the subdomain name box, type
*. - Choose your domain from the list.
- Check the Document Root. This is the folder the visitors will see. Change it if needed.
- Click Create.
Check your DNS
DNS is the internet's phone book. It must also know about the star name.
- Open Zone Editor in your control panel, or the DNS page where your domain's DNS is managed.
- Add a new A record. An A record points a name to an IP address.
- Set the name to
*. - Set the address to your server's IP address. You can find it in your welcome email or ask support.
- Save the record.
DNS changes can take some time to spread.
Things to know
- A normal subdomain you made yourself wins over the wildcard.
- Your website must have code to read the name if each subdomain should show different content.
- Normal SSL certificates cover only the exact names. A wildcard certificate covers
*.example.com. Ask support if it is available.
Tip: Test with a made-up name like
test123.example.com. If it opens, your wildcard works.Quick recap
- A wildcard subdomain uses
*to match any name before your domain. - Create a subdomain named
*in your control panel. - Add an A record with the name
*in DNS. - Wait for DNS to spread, then test a random name.