Subdomains and unrelated front zones

When using Unbound with forward zones, does Unbound accept wildcards to catch subdomains, or should each subdomain be specified as a separate forward zone?

Let's say there is a region


with subdomains


then what if any of the following names catch all subdomains?

 name: ""
 name: ""
 name: ""
 name: ""
 name: "*"


This can be considered very simple, but I searched, this site and elsewhere without finding an answer. Thanks for the help.


source to share

1 answer

Try the following:

local-zone: "" redirect  
local-data: " A"


requests for and are redirected, so users with web browsers cannot access sites with the suffix
source: cgi? unbound.conf

You can also redirect the .dev extension (choose any) to

local-zone: "dev." redirect
local-data: "dev. 10800 IN A"


this will redirect * .dev to, which is useful for web developers working with vhosts for example.



All Articles