Whitelisting for subdomains

Closes #1418