# Error: Hostname/IP doesn't match certificate's altnames

**URL:** https://discourse.nodered.org/t/error-hostname-ip-doesnt-match-certificates-altnames/71837
**Category:** General
**Tags:** security
**Created:** [7 December 2022 21:23 UTC](https://discourse.nodered.org/t/error-hostname-ip-doesnt-match-certificates-altnames/71837 "2022-12-07T21:23:44Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![benhelps](https://avatars.discourse-cdn.com/v4/letter/b/a5b964/32.png) [@benhelps](https://discourse.nodered.org/u/benhelps)
#### Post date: [7 December 2022 21:23 UTC](https://discourse.nodered.org/t/error-hostname-ip-doesnt-match-certificates-altnames/71837/1 "2022-12-07T21:23:44Z")

</div>

Recently I started getting the below from an external endpoint.

"Error: Hostname/IP doesn't match certificate's altnames: "Host: [wap.tplinkcloud.com](http://wap.tplinkcloud.com). is not in the cert's altnames: DNS:rbictg.com, DNS:\*.rbictg.com""

I presume it most likely they've done something dumb at their end, however in any case for the moment my intent is assume they'll eventually fix it ans to set node-red to ignore the errors and process anyway.

But, how?  
I've tried  
NODE\_TLS\_REJECT\_UNAUTHORIZED=0  
and then  
pm2 stop node-red  
pm2 start node-red

to no avail. Ideas?

(I saw an earlier post on here with similar issue but no outcome)

---

<div class="post-metadata">

### Author: ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)
#### Post date: [7 December 2022 22:41 UTC](https://discourse.nodered.org/t/error-hostname-ip-doesnt-match-certificates-altnames/71837/2 "2022-12-07T22:41:13Z")

</div>

Assuming this is caused by using an http request node, you can set `rejectUnauthorized` to `false` to ignore certificate errors, although this is not recommended, unless tplink is actually changing to rbictg.

---

<div class="post-metadata">

### Author: ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)
#### Post date: [8 December 2022 09:36 UTC](https://discourse.nodered.org/t/error-hostname-ip-doesnt-match-certificates-altnames/71837/3 "2022-12-08T09:36:40Z")

</div>

In these cases, you should always check the certificate details. It could indicate that something has intercepted your link and substituted the cert.

This can happen if you are on a corporate network and the organisation is monitoring connections. But, of course, there are also more nefarious reasons too.

---

<div class="post-metadata">

### Author: ![benhelps](https://avatars.discourse-cdn.com/v4/letter/b/a5b964/32.png) [@benhelps](https://discourse.nodered.org/u/benhelps)
#### Post date: [8 December 2022 20:24 UTC](https://discourse.nodered.org/t/error-hostname-ip-doesnt-match-certificates-altnames/71837/4 "2022-12-08T20:24:16Z")

</div>

Thanks, `rejectUnauthorized` false in the previous node solved that issue, however I no longer trust those devices (and it now returns a 503) so I'll replace them with another type.

I feel like kasa have likely abandoned that endpoint. The tapo brand ones still work (and via talking to the local IP).

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [22 December 2022 20:25 UTC](https://discourse.nodered.org/t/error-hostname-ip-doesnt-match-certificates-altnames/71837/5 "2022-12-22T20:25:15Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
