Change main_domain to portal_domain