Build HTTPS URLs when necessary