Preprocess domain