extract domain and subdomain from the url