automatically detect server address from URL