Parse hostname from URL string (handles both bare hostnames and full URLs).
A bare hostname or full URL
The extracted hostname
If input is empty, invalid, or uses unsupported protocol
Parse hostname from URL string (handles both bare hostnames and full URLs).