support for subdomains and direct medium added