Hostname route should throw an exception if route definition contains disallowed character

If a hostname route is constructed with a route containing a disallowed character (one outside of `[a-z0-9-.]`) a RuntimeException should be thrown, as the route is misconfigured. 

Fixes #5656