What are domains and sub-domains?

Domains, Subdomains and DNS are complex technologies, but with a brief overview we can help you get your domain working with your Moodle or Totara site.

What is a domain?

A domain is used to translate an IP address into a human readable string using a technology known as DNS (Domain Name System). In essence, a domain is the main address of a website. 

An example of a domain is “hubkencore.com”.


what is a domain?

Where do I get a domain?

You can purchase domains through services such as;

How to a point my domain to my Moodle or Totara server?

Once you own a domain, you will be able to setup the DNS for the domain to point the domain to different services, such as your Moodle or Totara site.

This is often done through the Control Panel provided by the domain service provider.

There are two types of DNS records you will commonly see mentioned, these are;

  • Type A Records – Points a string of text to an IP Address. I.e. www pointing to
  • CNAME Records – Points a string to an existing DNS record. I.e. (www to mycustomdomain.com)

What is a subdomain?

Subdomains are used to expand the use of a single domain, these do not need to be purchased separately to your domain; if you own a domain then you can add a subdomain to this.

This method is commonly used for Moodle and Totara site setups.

An example of a subdomain is “elearning.mycustomdomain.com.”

“elearning” being the subdomain to the domain “mycustomdomain.com”

The subdomain can be any string of text that can also include numbers and hyphens if required, however it is recommended to keep subdomains short to make then easy to remember.


domains vs subdomains

Subdomains vs Domains - what's the difference?

Simply put, a domain functions as the core site and is required in the creation of a website. A subdomain, on the other hand, are unique URLs that operate on top of the purchased domain. Unlike a subdirectory, a subdomain functions as a separate website from the main website, and is therefore useful for building separate areas for different information and access that appeal to specific audiences.   

How do I add a subdomain?

Subdomains are added through the Control Panel provided by the domain service provider.

The methods to add the “elearning” subdomain to “mymoodle.customdomain.com” would be as follows;

  • Create a new Type A record which points “elearning” to


  • Create a CNAME record which points “elearning” to mymoodle.hubkencore.com

The benefit of using a CNAME record over a Type A record is it allows us to control where mymoodle.hubkencore.com points to in the case we ever need to move your site hosted by us.