I just installed nextcloud on my linux machine and forwarded ports 80 and 443. I am happy to be able to connect via the web [nextcloud.mydomain.com] to my apache server/nextcloud BUT whenever I try to connect to it from my home network using the (sub).domain I get an error from my fritz box about DNS rebinding.
As far as I understand that happens when a device inside the network makes DNS request and that request is resolved to a private IP inside my home network. But I don’t understand why that happens.
The sub domain gets resolved fine when looking at it with nslookup. It points to the public IP of my router. I presume my router than forwards the request to my server. Is this where my private IP is pointing to another private IP in my network?
I added an exception in my fritzbox settings and that works, but have a feeling that that is a security risk.
How can I resolve this issue without adding this exception? I want to be able to login to my nextcloud from the internt and my home network.
Thank you very much