You need some way for every client to map "www.example.com" to the relevant IP.
To my mind, you've got 2 options.
- Add an entry in the intranet's DNS server (or setting up a DNS server if you've not got one).
- Add an entry to the "hosts" file on every client on the network.
You don't say how many clients you've got, nor what OS they are running.
On linux machines, the host file is /etc/hosts
.
On windows, the host file is C:\WINDOWS\system32\drivers\etc\hosts
Adding a line that says:
1.2.3.4 www.example.com
to this file should allow the client to resolve it.
However, editting and maintaining hosts files becomes a pain when you've many clients and/or many servers. Using a DNS server is probably the better option.