Allow www in custom domain

Allows the following variations for custom domains.

With and without trailing forward slash.
- `http://example.com/`
- `http://example.com`

`www.` with and without trailing forward slash.
- <code>http://<strong>www.</strong>example.com/</code>
- <code>http://<strong>www.</strong>example.com</code>