genhash: only use default url when url is empty