Meesage unsecured local connection


#1

Before I had letsencrypt on my raspi, I could open my website in a browser by typing the local ipadress.

To force https I’ve made this change:

RedirectMatch permanent ^(?!/.well-known/acme-challenge/).* https://mydomainname$0

question 1:
If I go to my local adress now, It changes autom. to the publicdomain.
Is there a way to not resolve it when I access it from my local network?

Question 2;
If my site is offline, I get a warning that my certificate is only valid for the domainname. Is there a way to make my certificate valid when I login on my private network or do I have to make an exception? What should I do?


#2

Why don’t you just add your domain with the local address to the hosts file of your computer?

Also, most modern NAT routers/devices also support NAT loopback, so why would you use the local IP address anyway? Safe the load on the router?


#3

tx Osiris, that helped.