Wildcard records are a type of resource record that will match one or more subdomains — if these subdomains do not have any defined resource records. Wildcard records are specified as the leftmost domain name label, using an asterisk (*) followed by a dot (.) as shown here: *.example.com. (Note that requests to the root domain, example.com, will never trigger the *.example.com wildcard record.)
Wildcard records can be used with any DNS resource record type except NS (name server) records.
In the example below, if info.example.com and support.example.com do not have any defined resource records, a DNS lookup for these subdomains will return an MX record pointing to mailhost1.example.com
*.example.com MX 1h 10 mailhost1.example.com.
In the example below, if learning.resouces.example.com and career.resources.example.com do not have any defined resource records, a DNS lookup for these sub-subdomains will return an MX record pointing to mailhost2.example.com.
*.resources.example.com MX 1h 10 mailhost2.example.com.
You can also create wildcard records for Google Domains Synthetic records.
*.example.com Forwarding 1h www.example.com
*.example.com App Engine 1h app-id