support www or tld-only hostnames