How to implement centralized DNS resolution

Source: Internet
Author: User
Tags website domain names

How to implement centralized DNS resolution

To meet the requirements, many organizations and individuals have created multiple different Web sites. To save site construction costs as much as possible, these sites generally use one machine and multiple sites technology, that is, the virtual host technology we mentioned at ordinary times. This technology is used to run multiple independent domain name Web sites simultaneously on a server with only one public IP address, multiple different website domain names direct to the same public IP address at the same time. This requires the DNS server to implement centralized resolution when creating a website. There are two methods:

One-by-one binding

The one-by-one binding method means to resolve domain names of different websites to the same IP address one by one. Take the Windows 2003 Server System as an example. Assume that we have applied for an aaaa.com domain name from the ISP in advance, the first task we need to do is to resolve the domain name to the public IP address of the server. Assume that the public IP address is 123.123.123.123. The specific resolution steps for this domain name are as follows:

First, click "start", "program", "Administrative Tools", and "DNS" commands to open the DNS Console window in the local server system, right-click the Host Name of the local server and run the "Create region" command from the shortcut menu, in the displayed new region wizard window, set the new region name to "aaaa.com" and click "OK.

Then, we need to create a "www" host name record under the domain name. Right-click the name of the previously created "aaaa.com" area and run the "Create host" command from the shortcut menu, in the host creation dialog box that appears, enter www In the Name box, 123.123.123.123 in the IP address box, and then click Add host, the website with the domain name "[url] www.aaaa.com [/url]" will be successfully resolved to the public IP address on the server. After the resolution settings are complete, the domain name of the website generally takes effect immediately. Therefore, we can use the Ping command to check whether the domain name we set can be pinged, if Ping is successful, the resolution operation is successful.

In general, in addition to accessing the target website, we also like to directly use the "aaaa.com" domain name without "www". Now we will resolve the "aaaa.com" domain name to the public IP address of the server at the same time. During this resolution operation, you also need to right-click the "aaaa.com" Domain Name and execute the "Create host" command from the pop-up context menu, in the host creation dialog box that appears later, enter "123.123.123.123" in the Name box, and then click "add host" in the IP address box, in this way, the website with the domain name "aaaa.com" will be successfully resolved to the public IP address of the server. In this way, even if the domain name resolution operation is complete, the domain name "[url] www.aaaaaa.com [/url]" and "aaaa.com" can be successfully resolved to a unique public IP address. Of course, if other website domain names need to be resolved, we can bind them to a unique public IP address one by one according to the above operations.

Next, we can create two Web sites and set the domain names of these sites to "[url] www.aaaaaa.com [/url]" and "bbbb.aaaa.com" respectively ", it is best to match the name of each site with the domain name, so that the server can easily identify and manage multiple sites after they are stored in China and Japan. When creating a Web site, you can click the "Start", "program", "Management Tools", and "Internet Information Service (IIS) manager" commands on the Windows 2003 Server Desktop, open the IIS6 Management window, right-click the "website" project in the left-side area of the window, and choose "New"/"website" from the shortcut menu, open the website creation wizard settings window.

Click "Next" to bring up the website description wizard interface. Make sure that the page is consistent with the corresponding domain name for future website management, therefore, enter "www Main Site" in the "Description" text box, and click "Next" to open the "IP address and port settings" window 2, here, we usually set "ip address" to the default "all unallocated", and "port number" to the default 80, set "Host Header of this website" to "[url] www.aaaa.com [/url]".

The wizard window will automatically prompt you to select the default website file storage location. You can click the Browse button to open the file selection dialog box and find the folder corresponding to the target Web site. After specifying the correct directory information for the target website, click "Next" and select "read" for the access permission of the target website, if the target site is an ASP dynamic page, we also need to select the "run script" project here, and then click "Next" to end the creation of the site, the site is published successfully. When you need to access the content of the site in the future, you can directly open the IE browser and enter "http: // [url] www.aaaa.com [/url] "to access the website content.

In the same way, we can create another site with the domain name "bbbb.aaaa.com" in the IIS6 Management window, however, in the "Host Header" in Figure 2, we must enter "bbbb.aaaa.com". Other parameters are basically the same. Of course, if we want to create sites with other domain names, we only need to draw images based on our requirements.
Use the wildcard domain name Method

When only a few website domain names need to be resolved, we can use the above binding method to resolve the domain names of different sites to the unique public IP address on the server in turn; however, if we still use the one-by-one binding method to complete domain name resolution tasks when the Organization has several site domain names to be resolved, the workload for resolving these domain names will be huge, in fact, we can use the wildcard domain name Method to Solve the Problem of concentrated resolution of several domain names. Now, we still use the common Windows 2003 Server System as the operating blueprint to introduce wildcard domain name resolution.

Suppose we have created an "aaaa.com" domain name in the server system, now, when we want to resolve multiple second-level domain names such as "bbb.aaaa.com", "ccc.aaaa.com", and "ddd.aaaa.com" to the server's unique public IP Address "123.123.123.123, you do not need to add host records in sequence according to the above method, but you only need to perform one-time setting according to the following operation steps:

First, click "start", "program", "Administrative Tools", and "DNS" commands to open the DNS Console window in the local server system, right-click the "aaaa.com" Domain Name on the local server and run the "Create host" command from the shortcut menu to open a host creation dialog box.

Then, enter "*" in the "name" column of the dialog box, enter the public IP Address "123.123.123.123" in the "ip address" column, and click "add host.

After completing the above settings, we can open any workstation in the LAN and execute the Ping command in it, to test the connectivity of multiple websites, such as "bbb.aaaa.com", "ccc.aaaa.com", and "ddd.aaaa.com, we will be pleasantly surprised to find that all the second-level domain names have been resolved to the same IP address at the same time, which indicates that the above wildcard domain name resolution settings are correct.


Next, follow the previous steps to enter the IIS6 Management window, and specify the home directory information of each second-level site, at the same time, set the "Host Header" information of each sub-site to their respective domain name information, so that the domain name resolution and release tasks of multiple Web sites are completed.

TIPS: When you resolve multiple second-level domain names to the same public IP address in a centralized manner, you can also modify the System DNS file to quickly complete the process, the procedure for this method is as follows:

Click Start, program, attachment, and Windows Resource Manager commands to open the resource manager window of the server system; in this window, double-click the "Windows", "system32", and "dns" folders, and find "aaaa.com. dns file.

Then, use a text editor such as NotePad to change "aaaa.com. open the dns file and add A "* A 123.123.123.123" record in the last line of the text editing area. "A" indicates that the newly added record is the address record, "123.123.123.123" is the public IP address pointed to by the wildcard domain name. After adding the above record, "aaaa.com. save the dns file and restart the server system. In this way, all the second-level domain names of "aaaa.com" will be automatically resolved to the public IP Address "123.123.123.123.

In fact, the centralized resolution of domain names provided above must have certain applicable conditions. Only under the appropriate conditions can we play an efficient and fast role; for example, the one-by-one binding method is only applicable when multiple website domain names are different. The wildcard domain name method can only be used to resolve multiple second-level domain names in a centralized manner.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.