Adjusted wildcard handling to include handling of subdomains with wildcards