Updated: 2021-11-19

What Is Domain is a domain, is another.

There can be sub domains, like,, but they all belong to the same domain.

How Does It Work

When user put into the browser, the browser does not know about that "example" website, it will ask the DNS (Domain Name System) server where to go. DNS server will lookup in its records, if it finds one, it will "resolve" the string into an IP address, so the browser can send the request to that IP and retrieve the content(HTML, images, etc).

Awesome! Where To Register Your Own Domain?

There are a few options, the prices and capabilities vary.

  • Google Domains
    • transparent and consistent price: $12 for .com, for example
    • you can make your information private without extra expense.
  • GoDaddy
    • can be very cheap for the first year
    • price may go up for the following years, keep an eye on your bills.
    • your information is public

Setup DNS

Once you have your domain registered, you can config the subdomains and other settings. A few terms to clarify:

  • A: map from subdomain to IPv4
  • AAAA: map from subdomain to IPv6
  • CNAME: map from subdomain to other domain or subdomain

The following sections illustrate how they can be used.

A/AAAA If You Know The IP

Use A(IPv4) or AAAA(IPv6) record since you know the IP

  • ->
  • ->

You can also point multiple subdomains to the same IP. All of the traffic to and will be sent to that IP, then it is HTTP server's job to find the right sub domain(www or app)

CNAME If You Are Using Another Service

By using Heroku or Github Pages or GitBook, you do not know the IP, so use CNAME to create an alias for each

  • -> <username>
  • ->


Using A/AAAA/CNAME will not modify URL, however Forward will redirect user to a different URL