Build a website from scratch (iii) DNS

Source: Internet
Author: User
Tags domain name server to domain

The first part of the site to build the two main elements: domain name and server, this time to say is the domain name resolution, that is, the domain name and server binding process.

When we visit the network, the URL is sent to DNSServer, which is then returned by DNSServer to the ServerIP address that we are going to ask for an interview. As stated in the previous article, there may be multiple sites or subwebs on the same IP address of a server, at which point the data we request is received by the server, and the server is required to infer which site's data is returned based on the domain name in the inferred URL.

That is, we will not only set the domain name on the dnsserver to the server's IP, but also configure the binding domain name on the server at the same time.

DNS services are common to be free to use, providing DNS services such as GoDaddy, domestic dnspod and so on. Suppose you are the domain name purchased from GoDaddy. Can directly use GoDaddy's DNS service, can also be set as a domestic dnspod.

is GoDaddy purchased the domain name after the login account display information, click the domain name product on the right side of the launch can enter the settings interface.

One of the most frequently used settings interface is the nameservers, the default is GoDaddy's own DNS domain name server URL, I changed the image to Dnspod address.

Assume that you use GoDaddy's domain name server. No need to change nameservers, directly click into the DNS Zone file to set up. The different domain Name Service provider's Setup method is basically the same.

The following is the Setup method for Dnspod.

First, register the account and login, enter the interface to join the domain name, follow the instructions to enter the domain name of your booklet, such as hainter.com. Do not need to add HTTP and www, then click on the domain name into the settings.

Select Join record. Record type Select a record, the host record is written @, indicates http://hainter.com, and the record value is the ServerIP address you rented. TTL is the time interval to refresh records on DNSServer, assuming that you need to change the IP frequently, the recording time can be shorter, otherwise you should set a bit longer, so that to a certain extent, will speed up the interview.

The same, and then add a record, this time to replace @ www. Represents the URL http://www.hainter.com. Assume that you do not need other sub-domains, mail and other services. This way, DNS is set up.

After setting it up to show roughly for example, there are two items in the NS type record, for the domain name record.

After Setup, you need to change the domain name's nameservers to Dnspod server address in the domain name provider's settings, which is what I set up in the previous picture.

Remember to save when you have finished setting up. Assuming you are very excited to immediately visit your domain name, you may find the prompt for domain name errors, which is because these settings are not immediately refreshed, and need to wait a few minutes for the global server to be refreshed. Another point is that your host is not bound to a domain name. It is also inaccessible to visitors.

As for the host how to bind domain name, basically there is not too much to introduce. Purchase the host will give you a URL to log in, access to the Control Panel. There will be options related to domain binding. Bind the domain name to be able to visit your site normally. Of course, the site is still empty, it is possible to display a default interface, such as GoDaddy's server will display the Commingsoon page.

At the beginning I just bought a domain name and no host, see the CNAME can set the domain name pointing to a URL, and then try to set the homepage point to Baidu, has not been successful.

I didn't know until later. The original host and domain names are required to be bound to each other.

Suppose you just set up DNS and point the domain name to ServerIP. The domain name is not bound on the server. You can ping the ServerIP with the ping command, but you cannot access the Web page.

At this point our domain has been able to access the interview. But there is no content inside the site. The next article will start by explaining the knowledge of building a site on the server.

This article first Self's personal homepage, reprint please indicate source: http://www.hainter.com/website-primer-3

Copyright notice: This article blog original articles, blogs, without consent, may not be reproduced.

Build a website from scratch (iii) DNS

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.