Adding subdomain functionality