A. Register a domain name with domain registrar :
You have to register your selected domain name with one of the ICANN approved registrars. You can register your domain for one year and after one year if you wish to continue then you have to register that it again. Your hosting provider can register your domain on behalf of you. You have to choose a suitable available domain name. To register a domain you have to provide the following information:
B. Domain name owner credentials (name, company name, address, phone, email address etc.)
1. Administrative contact credentials
2.Technical contact credentials
3.Domain Name System (DNS) server details
Your hosting provider provides the DNS server. The DNS server should have entries of the domain name as explained in the next section. At least a primary (e.g. ns1.yourdomainname.com) and a secondary (e.g. ns2.yourdomainname.com) name server addresses are required.
Now we discuss about DNS server setup in details:
C. Domain Setup On DNS Server:
After registering your domain you have to setup your domain on the DNS server. If you don’t completely setup your domain then your domain name will not work. The job of a A DNS server is to trace a domain name to IP address(es) of the web server and mail server so that a user can easily connect to the webserver or mail server using by typing the domain name in the browser. A forward lookup zone is created for the domain name in the DNS server. Start of authority (SOA), Name server (NS), Hostname (A), Canonical Names (CNAME) and Mail eXchange (MX) entries are added to the forward lookup zone as shown below for a domain “foodomain.com” with name servers “ns1.dnsserver.com” and “ns1.dnsserver.com”.
Start Of Authority Record:
SOA remove ‘is’ for Start Of Authority. It is very essential because it denotes the official DNS record for the domain name. There can be only one SOA record for every domain in a zone file.
@ IN SOA ns1.dnsserver.com. abc.dnsserver.com. (
20041014 ; serial number
900 ; refresh
600 ; retry
86400 ; expire
3600 ) ; default TTL
Address Record Entry: It is added to forward look up zone of the domain and its associated IP address of web server. It is also used for handling request on the domain.
foodomain.com IN A 126.96.36.199.
foodomain.com IN A 188.8.131.52.
CNAME stands for canonical name. The canonical name record maps an alias to the real name. Keep in mind that an alias for www is setup as a CNAME, so that requests to www.yourdomainname.com is sent to the same website that handles the requests for yourdomainname.com.
www IN CNAME abcdomain.com.
Name Server Record:
NS stands Name Server. The NS record is utilized to explain the name servers for the domain. It may seem unessential to keep a record of the name server in the DNS entry. The reason is that the name server is previously present in the registrar records, where the search for the domain starts. This record is required, in any case, anyone want to know the name servers for this domain. The name server records are mapped to CNAME entries (ns1 and ns2 in the example below).
abcdomain.com IN NS ns1.dnsserver.com.
abcdomain.com IN NS ns2.dnsserver.com.
Mail Exchanger (MX) Setup:
If you want to setup your email server to manage the domain mail account then you have to configure a mail exchanger. Such as: an email address like [email protected] will need a domain setup to solve the mail server for abddomain.com. The setup is common to the CNAME setup but with MX records. There can be various MX records (e.g. for backup mail servers).
abcdomain.com IN MX 10 mail.abcdomain.com
Note: You can check the DNS setup of the domain with DNSReport.com. This site permits you to get a detailed report of any DNS misconfiguration and possible solutions.
C. Configuring Web Server For Domain:
After you setup the DNS server you have to send the request for the domain to the corresponding IP address, and the work of the web server begins. The web server requires to be setup properly to manage the request for the domain based on either the IP address or the host header entry. Host headers are normally utilized by web servers to host multiple domains on one IP address.
Apache Web Server :
In case of Apache web server, you have to configure your subdomain by virtual host entries in httpd.conf. The process is as follows: