How can the host file be used to enable name resolution for a web server on a local network?

To enable name resolution for a web server on a local network, you can edit the host file on the client machine to map the server's IP address to a custom domain name. This allows you to access the server using the custom domain name instead of the IP address.

// Edit the host file on the client machine
// Add an entry mapping the server's IP address to a custom domain name
// Save the changes and now you can access the server using the custom domain name