added subdomain support to ad