       isGroupAlias      = re.test domain
       not isVmAlias and not isKodingSubdomain and isGroupAlias
 
+
   @fetchDomains: secure (client, callback)->
 
     {group} = client.context

    # Return type as internal and slug and domain
    return {type: 'internal', slug, prefix, domain}

  resolveDomain = (domainData, callback)->

    return callback null  unless domainData.domainType

    {domain} = domainData


        if (intersection baseIps, remoteIps).length > 0
          return callback null

        callback new KodingError \
          """CNAME or A record for #{domain} is not
             matching with #{baseDomain}""", "CNAMEMISMATCH"


  createDomain = (options, callback)->
