Add domainFromUrl func; Fix randString len too long.