So I have my router pointed at a NO-IP DDNS server. That gives me a static domain name for my router (lets say user.hopto.org).
ddns setting on router
I have my nginx reverse proxy and I port forward port 443 from that out my router. The reverse proxy points to my servers local IP address and ports.
Right now I have CNAME records for my domain name pointed to my NO-IP DDNS name. This works well on an external network. I can go to say 'test.user.io' and that will redirect to whatever server I have my reverse proxy pointed at.
cname record in namecheap
The problem is, locally I'm unable to use those hostnames. I have to point to the IP address (so on my PC I cant go to test.user.io I have to go to 192.168.2.200:8090 or something). The only workaround I have found right now is to update /etc/hosts files to resolve the names to the local IP addresses.
Why might that be? I do see that pinging a hostname will resolve to the routers public IP but I don't quite understand why I cant access them by the CNAME record name. I'm not sure what might be the issue with the router essentially resolving the names to itself, if that matters at all.
Would appreciate any insight. I'm also open to alternatives to solve this (not sure if using CNAMEs in this way is the right approach). I have a media server that I'd like to access locally and remote by the same domain name for ease of use by me and others who need it.