Just a though- if I add my internal IP address to A-record to a second level domain.com (assuming that I can't add it internally using AD/DNS)
Will it work in my internal network?
Theoretically, any PC in internal network will send a request to external DNS server when my domain.com is called; external DNS will shoot back an IP(internal); so the IP is reachable internally; should work?
Am not trying to use internal DNS nor Implement it. I am wondering if I can go around it. The main goal is to use mydomain.com internally which would be reachable from any internal computer
Yes. If you own "example.com" and have access to manage it's DNS records, then you can point "example.com" to 127.0.0.1 or any other IP address.
Here, I set up a live example for you. Look up the IP address of
localhost.gwhois.org
. (You can use my tool if you want: https://gwhois.org/dns/localhost.gwhois.org)I have it pointed to 127.0.0.1.
What you are suggesting should work.
But, as an alternative, I'd suggest you use your operating system's HOSTS file instead, and add an entry for your chosen host name, pointing at the desired IP address.
HOSTS files are checked before DNS.
Yes, this would work pretty much as you expect. If you control a DNS domain, you can create
A
records within the domain which resolve to any address that you like. You could buy your own domain for the purpose, or use a service like DYNDNS. In fact, this is the original purpose of services like DYNDNS--It gave people using residential broadband service a way to attach a permanent hostname to their IP address, even if their ISP doesn't offer such a service.