How to fix Hostname/IP does not match certificate's altnames with cloudflare's ssl

Viewed 13

I want to send a post request from my Node server to a https url like this:

fetch(url, {
    method: 'post',
})
.then(response => {
    console.log(response);
}).catch(error => console.log(error));

No matter if I use axios or fetch I cannot because each time I get this error:

Hostname/IP does not match certificate's altnames: Host: google.com. is not in the cert's altnames: DNS:amazeservice.net, DNS:www.amazeservice.net
  1. I'm using CloudFlare and it's SSL
  2. This is not happening in localhost

I can't find the solution in my case because I used CloudFlare's ssl.

How to fix or debug this ssl error?

0 Answers
Related