rename basedomain as maindomain