     match = domain.match /(.*)\.([a-z0-9\-]+)\.kd\.io$/
 
     [rest..., prefix, slug] = match
-    
+
     if newDomain and /^shared|vm[\-]?([0-9]+)?/.test prefix
       return callback new KodingError("Domain name cannot start with shared|vm", "INVALIDDOMAIN")
 

      JProxyRestriction.deleteRule params, (err)-> callback err

  @fetchGroupDomains: secure (client, callback)->
    JVM = require './vm'  
    JVM.fetchVmsByContext client, {}, (err, vms) ->
      return callback err if err
      JDomain.some hostnameAlias : $in : vms, {}, callback

          JDomain.one {domain}, (err, model) ->
            return callback err  if err
            if model
              return callback new KodingError("The domain #{options.domain} already exists", "DUPLICATEDOMAIN")
            model = new JDomain options
            model.save (err) ->
              return callback err if err
