extract domain and subdomain from a url