Installation & Licensing Center
HOW TO - Edit the Windows Hosts File
Authored by Caleb Scharf
November 3rd, 2026
12906 views
6 likes
KB1095134
Description
Use this workaround when a computer can reach the Ansys license server by IP address, but not by hostname (computer name). This points to a problem with your Domain Name System (DNS) server configuration, which we commonly see with VPNs.
We recommend fixing the DNS problem itself, because other users are likely affected too. When that is not feasible, edit the local Windows hosts file on the affected computer to work around it.
Specify the License Server by Hostname
Always specify your Ansys license server by hostname (computer name) in the Ansys Client Licensing Settings utility. You can enter an IP address there, but some Ansys software features do not work with an IP address. See HOW TO - Specify an Ansys License Server.
Solution
Work-Around for This Computer Only
This fixes the problem only on the computer you edit, not on other computers on the network. Fix the DNS problem whenever you can.
Edit the Hosts File
- Open Windows Search, search for Notepad, then right-click it and select Run as administrator.
- In Notepad, select File ➜ Open.
- Browse to the folder below, select All files from the file type drop-down, then open the file called
hosts.C:\Windows\System32\drivers\etc
- At the end of the file, add a new line with your license server's IP address, a space, then its hostname. Then select File ➜ Save.
Note: The line looks likeserver_ip_address server_hostname. Replaceserver_ip_addresswith your license server's IP address, andserver_hostnamewith its hostname.
Verify It Worked
- Repeat the action that failed before. If it now works, you are done.
- If the problem continues, test the connection to the license server and troubleshoot further with HOW TO - Test & Fix FlexNet License Manager Connectivity Issues.