so when I type in the external domain name into a browser of a non-local computer, my test website from that server loads fine over HTTPS, no certificate error whatsoever.
but when I first connect to my local network using SSTP VPN (VPN host name is the same as the external domain name that points to my server's public IP address), and then once i'm connected, I try to use the local domain name of my server in the browser, i get this certificate error.
NET::ERR_CERT_COMMON_NAME_INVALID
This server couldn't prove that it's [server's local domain name]; its security certificate is from [server's external domain name]. This may be caused by a misconfiguration or an attacker intercepting your connection.
what am i missing or doing wrong?
i don't know if it's related but on IIS server, I have set a rule to redirect HTTP to HTTPS.
my question is not a duplicate of the other one linked here. that question is not about 2 DNS names (one local and one external) it's about 1 DNS name and 1 localhost.