genhash: only assign default url when url is empty