work with http and https urls