Match subdomains with a wildcard record
Answer every subdomain that has no record of its own with one Edge DNS wildcard record, from Azion Console, the Azion CLI, or the API.
You can add a wildcard record to a zone in Edge DNS from Azion Console, the Azion CLI, or the Azion API. The record below answers 192.0.2.31 for every name of example.com that has no record of its own. To answer one named host instead, refer to Add, edit, or delete a record.
Prerequisites
Console
- A zone in Edge DNS for your domain. To create one, refer to Create, edit, or delete a zone.
- The Edit Edge DNS permission. Refer to Teams permissions.
digon your machine, to check the answer. To install it, refer to Query a zone with dig.- Access to Azion Console. To sign in, refer to Access Azion Console.
Add a wildcard record
A record named * answers every name of the zone that has no record of its own, however many labels deep. To answer only the names under one label, such as apps, name the record *.apps instead. Use your own domain wherever this page shows example.com.
Console
To add the wildcard record in Azion Console:
Access Azion Console > Edge DNS.
On the Zones page, select the row of the zone.
On the Records tab, select + Record. The Create Record drawer opens.
In Name, enter *. The Console shows your domain after the field and adds it for you, so never type the domain.
Keep Record Type set to A - IPv4 Address.
Keep TTL (seconds) at 3600.
In Value, enter 192.0.2.31.
The Console shows Edge DNS Record has been created, and the * record appears in the Records table.
A name with its own record keeps its own answer: if the zone holds an A record for www, a query for www.example.com returns that record, not 192.0.2.31. For which names a wildcard matches and which it does not, refer to Record types.
Check the answer
Ask Azion’s nameserver directly, without your resolver’s cache, for a name that has no record of its own.
To query ns1.aziondns.net for a name with no record, such as ghost, run:
The nameserver returns the value of the wildcard record:
The wildcard answers for ghost.example.com. If the command prints nothing, refer to A new record returns NXDOMAIN.