Many enterprises have set up multiple Web sites to meet the work needs of employees. To save costs, these websites usually adopt the virtual host technology, that is, building multiple websites on the same server, employees use second-level domain names to access these sites. However, it takes a lot of effort to maintain these second-level domain names, but we can use wildcard domain name resolution technology to solve this problem, you only need to set up your own DNS server in Windows to support wildcard domain names.
The following describes how to transform the DNS servers of Windows Server 2003 and Windows 2000 to implement wildcard domain name resolution. Assume that the DNS server has a domain rtj.net, so that the DNS server must support wildcard domain name resolution for this domain.
Wildcard domain name resolution in Windows 2000
Method 1
Open the DNS console, right-click the "rtj.net" area, and select "new domain" from the shortcut menu ", in the "New DNS domain" dialog box, enter "*" to create a second-level region named "*", and click "OK.
This region is allowed by the DNS server, and you also need to create a record with an empty Host name in the "* .rtj.net" region. Right-click "*. in the rtj.net area, select "New Host" in the pop-up menu. In the "new host" dialog box, do not enter any content in the "name" column, in the "ip address" column, enter the IP address to which the wildcard domain name resolution points. For example, enter "192.168.0.1" and click "add host". This allows you to resolve the wildcard domain name in the rtj.net domain.
Method 2
You can also manually modify the DNS data file to implement wildcard domain name resolution. Directly modify the DNS data file in the DNS folder under the system directory, go to the "CWinntSystem32dns" directory, and find rtj.net. use NotePad to open the dns file and manually add A "* A 192.168.0.1" record. "A" indicates that the record is an address record, and "192.168.0.1" indicates the IP address pointed to by the wildcard domain name, save the file, restart the DNS server, and load the DNS data file.
Wildcard domain name resolution for Windows Server 2003
The system's DNS server implements wildcard domain name resolution. It allows the "*" character to be used as the host name. You only need to create a host record named "*" in the "rtj.net" area, the process is very simple. Right-click the "rtj.net" area and choose "New Host" from the shortcut menu. In the "name" column of the "New Host" dialog box, enter "*". enter "192.168.0.1" in the "ip address" column, and click "add host.
After completing the above settings, you can use the Ping command on the client to test whether any second-level domain name resolution is successful. For example, enter the "Ping fymjxcs.rtj.net" command at the command prompt to obtain the response, which indicates that the wildcard domain name is successfully resolved.