This is very common and it means your router does not do hairpinning SNAT, usually requiring a specific configuration on the router, depending on which router platform you have. Some router platforms do not support hairpinning (I think my own D-Link required a firmware upgrade, some time ago).
- The "proper" solution (as @RonMaupin correctly points out) would be for the network to have its own DNS resolver so the domain, from the intranet, is resolved to its real intranet address; this setup isn't usually available in a SOHO/Home setup and is offloaded to the modem-router, where instead of doing DNS resolution, it routes the packets back after de/NATting them.
- A somewhat kludgy "workaround" is to modify your static DNS resolver [
/etc/hosts or %WinDir%\SYSTEM32\drivers\etc\hosts] and map the external resolved domain name [www.yoursite.com] to the internal IP address [e.g. 192.168.2.253]; you should then be able to access the site using www.yoursite.com, and if the site runs name-based virtual hosting, it will work and you'll be able to use the various developer tools that wouldn't work with the numeric IP address.
- Some firmwares [OpenWRT, etc.] also have the option of doing DNS caching and resolving [overriding] some hosts internally, usually done to cut out some ad-sites by mapping them to
127.0.0.1, but if used, it can override that one domain name with the internal IP address.
The best you can reasonably hope for, unless you set up an internal DNS, is to reconfigure the router yourself, or speak to the ISP and have them set up hairpinning properly.