redirecting correctly when an invalid listen  url is provided