How to access the site hosted from home using it’s domain name and not the Internal IP address while I’m at home

dnshome-networkinghome-servernetworkingrouting

I have a site open to the internet hosted from a small raspberry pi at home that uses Amazon's Route 53 to handle all things DNS related. Right now when ever checking on how my pages are looking in a browser the internal IP address must be placed in the address bar to gain access. In the Opera browser with the VPN feature turned on accessing the site can be done using the domain. Using a mobile device running on cellar and not local wifi also access the site through the domain. If the site is accessed through the domain on chrome the wheel in the title tab keeps spinning and eventually "This site can't be reached" with ERR_CONNECTION_TIMED_OUT is displayed

My knowledge of networking is very limited. It took about a week to tweak my AT&T router/modem into accepting http request to pass through. If someone could explain what's going on it would be greatly appreciated.

Best Answer

The most likely reason for this is because you can't access your own public IP from within your internal network. This functionality is known as hairpin NAT or NAT loopback and must be enabled at your gateway device that is performing NAT, most likely your router. Many consumer routers don't support this, or hide it in advanced options.

In the absence of hairpin NAT, you'll need to either use a local DNS resolver that's configured to serve an internal address for that domain (and forward other domains appropriately), or perform per-device configuration (e.g. hosts files, etc.).

Related Question