Rework DNS resolution