used by domain replace