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).
An example of a domain is “howtomoodle.com”.
Where do I get a domain?
You can purchase domains through services such as;
- GoDaddy - https://uk.godaddy.com/domains
- 123-Reg - https://www.123-reg.co.uk/domain-names/
- Names.co.uk - https://www.names.co.uk/domain-names
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 192.168.1.28
- CNAME Records – Points a string to an existing DNS record. I.e. (www to mymoodle.mylearningapp.net)
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.howtomoodle.com”
“elearning” being the subdomain to the domain “howtomoodle.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.
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 “howtomoodle.com” would be as follows;
- Create a new Type A record which points “elearning” to 192.168.1.28
- Create a CNAME record which points “elearning” to mymoodle.mylearningapp.net
The benefit of using a CNAME record over a Type A record is it allows us to control where mymoodle.mylearningapp.net points to in the case we ever need to move your site hosted by us.
A visual example of this can be found below for the site URL elearning.howtomoodle.com