check that url exists before adding it