':return: Returns the domain name for the url.'

@set_changed
def set_domain(self, new_domain):

    if (not re.match('[a-z0-9-\\.]+([a-z0-9-]+)*$', new_domain)):
        raise ValueError(("'%s'    is    an    invalid    domain" % new_domain))
    domain = self.netloc.split(':')[0]
    self.netloc = self.netloc.replace(domain, new_domain)
