Addsubdomain

Added subdomain logic to application