hostname is guarantee to never be null in this branch.