add better TTL support and fix url