Make site creation fail if the hostname is invalid

- In cases for example where it has a trailing slash.
- This uses URI.parse, which has to be given "http://" before the
  supplied hostname so that it works.