In this aritle you can learn all things about a domain including how it works and considerations for domain registration.
Registering a domain is not complicated. To be simple, you register a domain from a domain registar and pay for it (actually you need to pay for the usage anually). A domain can be considered as an alias to an IP. To find the IP for a domain, there are servers called DNS which store different levels of domain information. To make your domain available on the internet, you need to add some records to the DNS.
Basic concepts about domain and DNS
Domain name and domain registration
Domain name
A human-readable name of a web server.
Any computer (some ones are called web server) available on the internet can be reached by a public IP address (IP stands for Internet Protocal, an IP address like 142.250.190.78). Apparently such IP address is not human friendly, so we alias an IP address with a human-readable name called a domain name.
To find the IP address for a domain, there will be servers called DNS (Domain Name System) servers to store the information.
The process of
TLD (Top-Level Domain)
A domain is normally made of serveral parts separated by .
and read from right from left, like:
developer.mozilla.com
(SLD stands for Secondary Level Domain.)
The TLD is the last part of a domain name, such as .com
, .org
, .us
, .jp
. There are two types of TLD:
- Generic TLDs, such as
.com
,.org
. These TLDs typically tell users the purpose behind domain. Most generic TLDs don’t require your website to meet any particular criteria. - Geographic TLDs, such as
.us
,.jp
. These TLDs are associated with areas such as countries or cities. Some of them are required to be hosted in certain countries or areas. While others like.io
(British Indian Ocean Territory) is allowed or encourged to be used as a generic TLD.
Domain registar
A domain registar is a company that is accredited by ICANN to process domain registrations.
To buy a domain (Or preciously, to pay for the right to use a domain name for one or more years, then you can renew the right), you need to register it from a domain registar.
Transfer a domain
Transferring a domain means you transfer domain registration from one registrar to another one. Like you have registered a domain at Amazon Route 53 (Actually it is a domain reseller for domain registar — Amazon Registrar), you can transfer it to .
- Whether you can transfer your domain?
Depends on the domain’s TLD (like.com
,.org
) and the domain registar. Like at Amazon Route 53, a.com
domain is supported to transfer, while.cl
is not supported. - Domain transer requirements
Generally most domain registrars enfore requirements on transferring a domain like you must have registered the domain at least 60 days before transferring it. These requirements are mainly used to prevent repeat domain transferring related with domain fraudulent. - Domain transer price
Depends on the domain’s TLD and the domain registar you tranfser to. Like at Amazon Route 53, the transfer price for a.com
domain is$13
and it is$0
for a.com.au
domain, and$90
for a.jp
domain. - Domain expiration date
When you transfer a domain between registrars, how the domain expiration date is affected depends on the domain’s TLD and domain registrars. Some registrars keep the same expiration date, some registrars add a year to the expiration date.
DNS (Domain Name System) concepts
DNS
Basically, the DNS (Domain Name System) translates a domain such as example.com into an IP addresse. There are many servers of them worldwide.
Name servers
Name servers finally give the IP information about a domain.
Once you register a domain at a domain registar, the registar will set name servers for the domain which generally you can find in the domain details at the registar. Therefore when the user enter your domain in the browser, the request will be finally delivered to these name servers. To make the user reach your website, you also need add DNS record to the name servers to set the domain and the IP pairs.
You are able to change the name servers to use other DNS service rather than that from your domain registar, this is just delegating your domain to another registar not transferring it.
DNS record
An DNS record is an object you use to define how you want to route traffic for the domain or a subdomain. Like you resiter a domain example.com
then generally you create two DNS records to set IP address of your web server for example.com
(domain) and www.example.com
(subdomain). Then when an user enters example.com
or www.example.com
, the DNS are able to tell the browser the IP address of the domain.
A record has three parts:
– Name
The name of the record corresponds with the domain name (example.com) or subdomain name (www.example.com, retail.example.com
– Type
The record type usually determines the type of resource that you want traffic to be routed to. For example, to route traffic to a web server that has an IPv4 IP address, you specify A
for Type.
– Value
If you specify A
for Type, you specify an IP address in IPv4 format, such as 192.0.2.136.
Most domain registars provide free or paid DNS service so you can add DNS records. If your domain registar does not provide DNS service, there are some free DNS service providers.
WHOIS
WHOIS (‘Who is’) is a system that allows users to query the name and contact information of a registered domain name.
Most Domain registars provide WHOIS service that tells you whether a domain name is available. And an whois
shell command can also be used to query a domain information.
Register a new domain
Considerations
- Domain registrar
Different provides different prices and different additional services like DNS service, privacy protection (whether to hide contact information from WHOIS queries.) - Price
The registration price (basically the fee for the domain usage of the first year), renew price, other possible additional charges.
> Like you register a domain at Amazon Router 53 an intend to use its DNS service (you can also choose other free DNS service), except the domain registration fee, they will also charge a small monthly fee for a hosted zone (Like$0.5
) and DNS queries. See more at Amazon Route 53 Pricing.
Other prices you mare care like transfer price, change owenership price (generally 0 for most domains), …, etc. - A domain names can not be changed after you register it
Choose a domain registar
Different domain registar provide different prices and different additional services.
Below are some of them:
- Cloudflare Get a
.com
domain for about$8
(Free DNS, …) - Namecheap Get a
.com
domain for$5.98
(registration price not renew price, 2013, Free DNS, Privacy protection). - AWS Route 53 Get a
.com
domain for$13
(2013 price, Amazon Route 53 DNS with small monthly charges, Privacy protection). - Google (Free DNS, …)
Check the trend of name servers at Name Server Usage Distribution in the Top 1 Million Sites:
- Cloudflare DNS 32%
- Amazon Route 53 15%
- Other 41%
Register a domain from a domain registar
Basically the process of domain registration is look like:
- Login into a domain registrar’s website.
- Choose to register a domain.
- Enter the domain you want o register.
- Enter the payment information.
- Enter contact information for the domain like name, contacts. You may can also set whetherto hide your contact information from WHOIS queries.
- You may receive an verification email and need to vefiry it.
- If you want to use the domain immediatly, then config the DNS service for the domain (Set an IP address of your web server for the domain).
Config DNS records
Normally, the domain registar provides DNS service and guids you hows to do that. If you want to use other DNS service, there are many free choices, like Google, Cloudflare DNS, OPEN DNS.
You can use other DNS service no matter whether your domain registar provide its own. Reference your domain registar for how to do that. Basically the process is like:
- First add DNS records at the DNS service provider;
- Then change name servers from old ones (provided by domain the registar by default) to new ones (provided by the DNS service provider) at your domain registar — normally the domain details page.
It will take up some time for the changes to take effect. Adding new DNS records first then changing name servers avoids your domain being unavailable during the process.
Note:
Changing name servers | AWS: By default, DNS resolvers typically cache the names of name servers for two days. As a result, your changes can take two days to take effect.
Here are links to constructions on how to update name servers for popular registrars: Google, GoDaddy, AWS Route 53.
Resource
- MDN: Web mechanics
- How does Internet work?
- What is a domain name?
- …
- Amazon Route 53
- Amazon Route 53 concepts
- How internet traffic is routed to your website or web application
- After you register your domain name like example.com, Route 53 automatically creates a public hosted zone for your domain. You need to create records in your hosted zone to tell the Domain Name System (DNS) how you want traffic to be routed for that domain (To be simple, basically you set an IP address for the domain).
- An user enters
www.example.com
in the browser to access your website. - The request is routed to a DNS resolver, which is typically managed by the user’s internet service provider (ISP).
- The DNS resolver for the ISP forwards the request to a DNS root name server.
- The DNS resolver forwards the request to one of the TLD name servers for .com domains. The latter responds to the request with the names of the four Route 53 name servers that are associated with the example.com domain.
The DNS resolver caches (stores) the four Route 53 name servers to save time for the next time. The name servers are typically cached for two days. - The DNS resolver chooses a Route 53 name server and forwards the request to it.
- The Route 53 name server looks in the example.com hosted zone for the www.example.com record and gets an value like an IP address and returns the IP address.
- The DNS resolver finally has the IP address and returns it to the browser.
- The browser sends the request to the IP address.
- The web server (or other resource) at the IP address returns the web page to the browser. Then the browser display the page.
The browser may also cache the IP for the domain.