Just store NUL-terminated strings. This works better when we add support for multiple hostnames. (cherry picked from commit b3012c69)