Can I create a DNS domain for local use?

Is there a way for me to assign a domain name to a computer's local IP address, not for use with people outside the network?

Preferably with no need to buy said domain.

A example would to use domain.com for the IP 192.168.1.11, a local computer on the network, and when I type domain.com in my browser it will bring me to whatever is on http://192.168.1.11:80/


Solution 1:

The simplest solution:

Open C:\windows\system32\drivers\etc\hosts with notepad. Write in the following line:

192.168.1.1 domain.com

This change will be visible on your computer only. If you have more than one, maybe you need to make this on every computer.


More complex ways, if you need multiple machines to access this:

  1. Check deep the menu system of your local router. Most of them have local dns functionality. Look for "dns", "name server", "zone", "local zone" or such menu entries. There you can set it up.

  2. You could run your own DNS server on your network. If you configure your networked computers to use your new DNS server you would be able to push the new "domain" or "host" with a single configuration change at the DNS server.

  3. You could find a free dns provider on the net (google for: free dns zone), and with it you could set up a zone for your local network. It were a sub-optimal solution, because it made your local dns out of your local network, and thus it has many disadvantages, although it could work.

Solution 2:

At one point, I was testing things like this and came across Simple DNS Plus. It's basically just a DNS server software than can run on any Windows box. It's pretty configurable and did the trick for me. It's not free and I'm in no way affiliated.

enter image description here

enter image description here