       JDomain.assure { domain }, (err, domainObj) ->
         console.log err  if err
 
-        hostnameAliases = []
-        if domainObj.domain.indexOf("vm-") isnt -1
-          hostnameAliases.push hostnameAlias
+        hostnameAliases = [hostnameAlias]
 
         if domainObj.isNew
           domainObj.hostnameAlias = hostnameAliases

      users = [
        { id: user.getId(), sudo: yes, owner: yes }
      ]
      [hostnameAlias]  = hostnameAliases
      groups          ?= []



  @fixUserDomains = permit 'change bundle',
    success: (client, callback)->

      unless client.context.group is "koding"
        return callback new KodingError "You are not Koding admin."

      JDomain = require './domain'
      JUser   = require './user'
