I fixed it by fetching the domain name that I got the SSL certificates for instead of the IP address of the server.