Write domain to DB