Set both host and hostname after parsing url.