WebsiteGear Logo Log In
New User? Sign Up
About | Contact | FAQ
  Home Content Web Hosting Sunday, May 26, 2024 
Print| Email| Save| Discuss| Feeds

Website Domain Name Configuration
Published: Thursday, October 14, 2004

Domain Name Configuration
Before understanding how to configure a domain name, one should know how a domain name works. There are three parts to setting up a domain name for a website - (i) registering the domain name with a domain registrar, (ii) setting up the domain name entry in a DNS server, and finally (iii) configuring the web server to listen to the requests for the domain name. A request for the domain (e.g. starts at one of the registrar's server, which then routes it to a DNS server containing the DNS information for the domain. Once the DNS record for the domain resolves the domain name to a particular IP address, the request is sent to the web server listening to that IP address. The web server can now delegate the request to the particular website based on the domain name in the host header of the request object.

Registering A Domain Name
A domain name needs to be registered with one of the ICANN ( approved domain registrars for a yearly registration fee. One of the cheapest registrar with all the required features is ( There are registrars for each country specific domain names (such as for United Kingdom, .nl for Netherlands). One should choose a domain name very carefully. After deciding on an available domain name, one has to provide the following information during the registration process:
  1. Domain name owner credentials (name, company name, address, phone, email address etc.)

  2. Administrative contact credentials

  3. Technical contact credentials

  4. Domain Name System (DNS) server details

The DNS server (also known as name server) is usually provided by the web hosting company. The DNS server should have entries of the domain name as explained in the next section. At least a primary (e.g. and a secondary (e.g. name server addresses are required. DNS server setup requires extra knowledge and is not within the scope of this article.

Domain Setup On DNS Server
The domain setup on the DNS server can be done after the domain is registered, however, the domain name will not work until the DNS setup is completed. A DNS server maps a domain name to IP address(es) of the web server and mail server so that a client can connect to the webserver or mail server using the domain name and not the IP address. 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 "" with name servers "" and "".

Start Of Authority (SOA) Record: The SOA record is very important because it denotes the official DNS record for the domain name. There can be only one SOA record for each domain in a zone file.

@ IN SOA (
20041014 ; serial number
900 ; refresh
600 ; retry
86400 ; expire
3600 ) ; default TTL

Address (A) Record Entry: The address (A) record is added to the forward lookup zone of the domain and it is associated with the IP addresses of the web server, which will handle the requests for the domain. There can be multiple A records, in which case, it will use the round robin DNS load balancing mechanism to assign the requests. IN A IN A

Alias (CNAME) Entry: A canonical name (CNAME) record maps an alias to the real name, Note that an alias for www is setup as a CNAME, so that requests to is sent to the same website that handles the requests for

Name Server (NS) Record: The NS record is used to define the name servers for the domain. It may seem unnecessary to keep a record of the name server in the DNS entry because the name server lookup is already present in the registrar records, where the lookup for the domain starts. This record is needed, incase, someone requires to know the name servers for this domain. The NS records are mapped to CNAME entries (ns1 and ns2 in the example below). IN NS IN NS

Mail Exchanger (MX) Setup: The mail exchanger domain configuration is required if an email server is setup to handle the domain mail accounts. For example, an email address like will require a domain setup for resolving the mail server for The setup is similar to the CNAME setup but with MX records. There can be multiple MX records (e.g. for backup mail servers). IN MX 10

Note: Test the DNS setup of the domain using This site provides a detailed report of any DNS misconfigurations and possible solutions.

Configuring Web Server For Domain
Once the DNS server is setup to send the request for the domain to the corresponding IP address, the work of the web server begins. The web server needs to be configured appropriately to handle the request for the domain based on either the IP address or the host header entry. Host headers are commonly used by web servers to host multiple domains on one IP address.

Microsoft Windows IIS : In case of Internet Information Server (IIS), create a new web site for the domain using the IIS Manager, and add the domain (e.g. as a new host header value listening to the same IP address as specified in the DNS entry. The port is set to 80 (the default for http requests). The host header can be added by clicking on the advanced tab next to the IP address configuration for that web site application. Set the home directory for the domain web site to the directory (e.g. C:\Inetpub\wwwroot\). Add another host header entry for so that anyone can access the website when typing with www in the beginning.

Apache Web Server : In case of Apache web server, the subdomain is configured by virtual host entries in httpd.conf as shown below.

Listen 80
NameVirtualHost *

<VirtualHost *>
DocumentRoot /home/httpd/htdocs/

<VirtualHost *>
DocumentRoot /home/httpd/htdocs/

Domain configuration starts with an entry with a domain registrar, and the registrar record maps the domain to name servers, which contains the detailed DNS entries for the domain. The lookup for the domain name at the designated DNS server resolves the domain to an IP address of the web server. The web server in turn delegates the requests based on its configuration for the domain.
Previous Article About Website Domain Name
Print| Email| Save| Discuss| Feeds
Nav SubDomain - The Third Level Domain
A subdomain is the part of the website address before the domain name. Learn about using subdomain names.
Nav How To Sell A Website
If you have an existing website or domain name you no longer need and wish to sell, this article will explain the steps you need to take to ensure a quick, easy, profitable sale.
Nav Website Revenue - An Introduction
Does your website make money? There are billions of websites on the internet. About 30 million domain names are registered. But among these, how many of the websites do make money?
News Post Knauf Digital Implements Configit Ace SaaS for Configuration Lifecycle Management
Leading Building Materials and Systems Producer Implements Configit to Enrich CPQ Process COPENHAGEN, Denmark, May 21, 2024 /...
News Post Lockheed Martin COO and CFO to Speak at the Bernstein's 40th Annual Strategic Decisions Conference
BETHESDA, Md., May 23, 2024 /PRNewswire/ -- Lockheed Martin (NYSE: LMT) will webcast live a presentation by Chief Operating O...
News Post AGI to Debut at COMPUTEX 2024
TAIPEI, May 20, 2024 /PRNewswire/ -- AGI Technology, a pioneering provider of high-performance storage solutions from Taiwan,...
News Post NEXCOM Delivers Exceptional Performance in Edge AI Video Analytics
TAIPEI, May 23, 2024 /PRNewswire/ -- NEXCOM, a leading supplier of network solutions, published AI and storage performance te...
News Post Lockheed Martin Elects Heather Wilson to Board of Directors
BETHESDA, Md., May 22, 2024 /PRNewswire/ -- Lockheed Martin (NYSE: LMT) today announced its board of directors has elected Dr...
Submit News | View More NewsView more news
Classified Ad Cheap Domain Registration
Looking for cheap private domain registration and cheap web hosting plans? BallisticDomains is a lea ...
Classified Ad Domain Registration and Web Hosting
We provide the best price for domain registration and web hosting. Domain name price like .com Rs.55 ...
Classified Ad Domain Registration and Web Hosting
We provide the best price for domain registration and web hosting. Domain name price like .com Rs.55 ...
On offer the domain CAVA.PINK parked and sold at SEDO marketplace. Safe buy, all included. CAVA = CH ...
Classified Ad .RS Domain Registration - Accredited registrar
Serbian domain names are registered in the following domain name spaces: .rs domain can be regist ...
Post Free Ad | View More View more classifieds
Forum Post Strange problem with domain name configuration
We have a few domain names registered with Network solutions. Recently, we changed web hosts. In t ...
Forum Post Redirect Domain to new subsite
My apologies if this is a dumb question: We have 20 location sites on their own domains (with th ...
Forum Post Parent servers say that the domain does not exist
I have a certain question related to DNS configuration: 1) a week ago my internet domain SKARBIEC ...
Forum Post DNS Records For Google Apps For Your Domain ERROR
I'm trying to use Google Apps for Your Domain, and have pointed to editDNS ser ...
Forum Post Configuring BIND on windows 2003 server VPS
Hi Guys, I have a Windows 2003 Virtual Private Server and I'm trying to configure it with a BIND ...
Add New Post | View More View more forum posts
Nav How To Sell A Website
Nav Subdomain Configuration - How To Setup A Sub Domain
Nav Domain Configuration - How To Setup A Domain Name
Nav Website Layout - Tips & Tricks
Nav Round Robin DNS Load Balancing
Nav Introduction To Server Load Balancing
Nav Website Traffic & Revenue
Nav Tips On Using SubDomain
View More News View More News