DNS lookup for dynamic domains in rack applications