match document domain to avoid WrongDocmentError if they differ