Add robustness against dns errors and better logging when no redirects are present