Registering a Domain Name for your LMS
The steps for registering a domain name for your website can feel mystifying and arbitrary if you don't know what's going on. This step-by-step tutorial aims to give you some background knowledge about how the internet works, so that to register with confidence. We explain the concepts of IP addresses, domain names, and DNS records in plain terms with plenty of screenshots, references, and patient explanations of the details. Also, this tutorial is generalizable to all websites, not just LMS sites. Let's go share your site with the world!
Table of Contents
Introduction: Jumping into the Deep End
Even though domain name registration is one of the first tasks with which your confronted when putting anything on the web yourself, it's not always super easy to understand right off the bat. It can feel a bit like jumping in the deep-end when learning how to swim. There are probably a million sets of instructions out there for registering a domain name to your website, however when I was starting out, it seemed to me that important introductory concepts were taken for granted and/or buried under lots of other details that aren't so important for very beginners. Ultimately, I found that I would need to consult various tutorials to get a comprehensive view of concepts like domains, IP addresses, DNS records as well as thorough instructions on how to go about setting up a domain name. Also, I found that even the documentation provided my DNS provider wasn't always the easiest to follow and wasn't geared towards a novice audience. I often felt like I was expected to follow random instructions blindly without knowing why I'm doing what I was doing or why. I didn't like that, and I imagine you don't either.
Therefore, my intention with this tutorial (and indeed, with this whole website) is to lay everything out plainly and comprehensively. I'll also go into enough detail that hopefully you will not only set up a domain name, but also understand why everything works the way it does. The idea is that, in the future, you might be able to register your next domain without a tutorial at all! I'll go through everything with as much detail as is helpful, providing links and references along the way. All in all, this is the tutorial which I wish I had when I was starting out long ago.
An empowered website hoster-to-be
This image, entitled Empowered, by SEP Blog,
is licensed under a CC BY 2.0 license.
IP Addresses, Domain Names, and DNS Records
"A domain name is a human-readable web address (e.g. "google.com") that points to an IP address and helps users to access websites or other resources in a convenient way."
Domain names are just labels for IP addresses that are linked by DNS records. Therefore, let's introduce each of these concepts in turn:
IP Addresses
The first thing to understand is that every device that is connected to the internet has a unique address: the IP address. It's just like how every building connected to the mail service as an address (or at least a post office box number). When your web browser requests a webpage from a server (say Google's server), your IP address is attached. This way, the server knows who the request is coming from and where to send back the relevant information. For example, you can easily check the address of your VPS server from the command line with:
hostname -I
(By the way we have a tutorial on getting one, if you don't have one yet)
Without over-complicating things, the IP address that a server would receive is probably the one belonging to your home router, rather than your individual laptop, iPad, etc. To the outside world, all of your devices that are on your home network have the same external IP address. Think of it like the mail room at an office building, if a letter arrives for you addressed to the building's address, the mailroom knows your specific office number and will deliver it for you. For example, you can reach the Google site by entering its address, 142.251.35.174 in your search bar. Go ahead, give it a try!
If you want to learn more about this, I'd recommend checking out the Mozilla Developer resources.
Domain Names
Of course, no one remembers IP addresses, so the addresses are mapped to names. This is a practice that goes way back to the U.S. military's ARPANET project in the 1960s, one of the precursors to the modern internet. On APRANET, each computer on the network had a copy of a text file with a list of which numerical address corresponded to which name. In the 1980s, that practice was carried over to the public Internet. (Perhaps you are curious about the oldest currently registered domain names?)
Who is the ultimate authority regarding which IP corresponds to which domain name? An organization called ICANN that is ultimately responsible for maintaining and coordinating the name servers. ICANN also decides which "top-level domains" (TLDs) are valid: for example, .com, .net, .org, .biz, etc... The part of a domain name that identifies your particular brand/business/etc. is called a "second-level domain." You may also have multiple "subdomains" associated with your site/service:
The structure of a domain name
All together, these make up your "Fully Qualified Domain Name", or (FQDN). You can read more about how domain names are structured in this Wikipedia article.
ICANN, in turn, auction the rights to assign these names to the domain name providers who you recognize, like NameCheap, GoDaddy, etc. These companies (with a few exceptions) rent domain names on a first come, first serve basis. So, who gets to become a domain name provider? Actually, anybody can, as long as they have been accredited by ICANN (which costs money, of course).
DNS Records
Clearly today, there are so many web servers that a single file with all of the "IP address to domain name" mappings doesn't make sense. Now, when you need to look up the corresponding IP address for a domain name, you make a request to a database administered by a "directory service," or "name service," called the Domain Name Service. Therefore, the individual mappings are called "DNS records".
By the way, there are many DNS servers out there. You can find out which DNS server is storing the mapping for of the LMStutorials.com server:
host -t ns lmstutorials.com
It returns:
lmstutorials.com name server dns1.registrar-servers.com
Indeed, "registrar-servers.com" belongs to NameCheap where I purchased my domain name.
There's actually no difference between "buying" a domain name and registering your IP address to that domain name with the official name servers.
It's worth mentioning that you don't actually own your domain name, your just leasing it from the domain provider. Therefore, it's important that you don't let it expire!
Okay, so what do you need to get your own domain name set up?
Prerequisites
You don't need much in terms of knowledge or skills to register a domain name, but you will need a server.
-
A Virtual Private Server (VPS) running Ubuntu Server OS (We've got a tutorial on this)
-
Apache Web Server installed on your server
-
Around $10 USD to purchase an domain name
Domain Name Instructions
One piece of general advice is to remember that certain steps in this tutorial may involve waiting for a few minutes. Just because you don't see results instantly doesn't mean that you've done something wrong. Be patient!
Okay, enough chit-chat! Let's get you set up with your domain name!
"Let's go!"
STEP 1: Find an Available Domain Name
Not surprisingly, the first thing you'll have to do is actually find an available domain name.
Visit a Domain Name Provider
There are many companies out there that will lease you a domain name. I use NameCheap as my domain provider, but of course, you can use whoever you like.
Search for a Name
On NameCheap.com, there is a search engine to browse available domain names:
Plug in some candidate domain names!
I recommend you take time to put some thought into it though.
Once your site becomes recognized, you may lose traffic by changing your name.
You'll notice that most common names are reserved. Consider creative compound words!
Also, think about what "top level" domain you would use.
Of course .com
is the most common, but it will be the most difficult to find an available name.
If you are an online educator, consider education-themed TLDs, like .courses
, .education
, .academy
, .training
, etc.
Furthermore, if you're purchasing a .com domain you anticipate getting a lot of traffic at some point (hey, dream big), you might want to lock down the .org and .net versions of the same name.
Countless hours have been dedicated to the pondering of new domain names.
STEP 2. Purchase the Domain Name
You're now ready to buy the domain name!
Go to the checkout to purchase the domain name that is now in your shopping cart. You'll see that there are some more relevant details:
-
First, you may have to pay an "ICANN fee". This is actually a fee that your domain registrar pays to ICANN, the guys who actually control all of the IP address records. ICANN lets businesses like NameCheap or GoDaddy resell domain names. So that fee is just getting passed off to you [shrug].
-
Second, you'll see that there is an "auto-renew" option. Unless you are sure that you are okay with potentially losing your domain upon expiry, you should make sure that this is selected. Remember, you don't own your domain name; you're just renting it for the specified contract period.
-
Domain Privacy option: There is an official database of domain name registrant info. If you would rather appear anonymous in this database, keep this option selected. Remaining private is a default setting.
-
Remember to use a promo code is one is available and save a few bucks! Usually, you can use one if it's your first time purchasing a domain.
The NameCheap checkout
If you have never purchased a domain name with NameCheap, you'll need to provide some registration information. Again, this info will identify you in the official registration database, if you like.
Once you've finished the checkout process and created a user account on NameCheap, you should be able to see your domain now in your NameCheap dashboard.
STEP 3: Create "A records"
What the heck is an "A record"?
In the introduction, we talked about DNS records at a high level: they are the official mappings of your domain name to your IP address. So, now it's time to create your one for your new domain name. In particular, we're going to create an "A record."
This is an area where I find that a lot of online tutorials go too quickly. For example, what's the difference between an "A record" and other options? What is TTL? Documentation on NameCheap references "@" and "www" "host values." What the heck are these?!
An "A" record is simply the record that translates your domain name to your IP Address. "A" records aren't the only type of record: other common record types include AAAA, CNAME, MX, NS, PTR, SOA, SRV, and TXT. We'll talk about those another day or read more about them here.
"Base domain" vs. "Subdomain " Records
You will probably want two A records: one connecting your IP address with your "base" domain (e.g., yourdomainname.com) and another connecting your IP to the "www" subdomain (e.g., wwww.yourdomainname.com). If you're curious about the purpose of the "www"... If you are using NameCheap, you can add A records from your account dashboard. To access your dashboard:
-
You will first need to create an account on Namecheap.com
-
Then, you can find the dashboard in the top navigation bar at "Account" > "Dashboard".
-
On the menu item for the domain you just purchased, click "MANAGE":
-
Next, click the "Advanced DNS" tab:
In the "Host Records" section, click "Add New Record":
...and select the "A Record" option.
Under "Host," put @
. This is shorthand for your base domain.
For "Value," put the IP address of your server. Remember, you can find the IP address of your VPS by looking it up in your terminal with:
hostname -I
If you don't know how to do this yet, don't worry. You can look it up from your NameCheap VPS dashboard. From the NameCheap homepage, go to "Account" > "Dashboard" > "Hosting List" > "Go to VPS Panel". Here, you find the IP address.
TTL stands for "Time to Live" and is a concept that will discuss in the next step. Unless it is very important that your DNS record is active very quickly or you are trying to ensure the fastest page loading possible, you can just leave this set at "automatic."
Now, repeat this process, entering www
in the "Host" field for the second record.
Your "Host Records" section should look like something like this...
Now all you have to do is wait a bit. How long depends...
STEP 4: Wait for Propagation
What is "Propagation?"
Your DNS record will not go into effect immediately. Also, just because your site is accessible from your domain name for you, doesn't mean that it is the case for everyone all over the world. The process of your record updating on all of the name servers out there is called propagation. Remember how there was a "Time to live" (TTL) option when setting your DNS record? In brief, this is the amount of time that a client's request to your server is allowed to persist before it is discarded. If the TTL is short, changes to your DNS records will be picked up quicker by people trying to access your site (like if you changed your domain name). If the TTL is longer, your site may load faster because any existing DNS record sticks around in the DNS server caches longer. For most of us, this isn't very important. The upshot is just that there are pros and cons to specifying longer or shorter TTLs in terms of how long people might wait to get access your site if you make changes to your DNS records. You can read more about longer vs. shorter TTL values here on Stack Overflow or in this Reddit post. Also, NameCheap has an explanation for why DNS propagation sometimes takes a while.
You can use the Google DNS checker tool to see if the rest of the world sees your page.
Conclusion: Congratulations!
Bravo! You are now the proud owner of your domain! You are awesome.
You are the king/queen of your domain! All hail!
Next Steps
Now that you have your domain name registered, you'll want to move on to the important stuff: creating and sharing content for your users! If you haven't done anything on your server yet, you're probably just seeing the "Apache for Ubuntu" splash page when enter your domain name in your web browser:
You may only see the Splash page when you enter your domain name
For many of you reading this tutorial, this next step will be installing an LMS like Moodle (check out our Moodle installation tutorial) or Open edX (We've got an Open edX installation tutorial too!). Further steps might include setting up SSH access for your server (so that you can log in remotely) and/or obtaining SSL Certification for your site (so that your users can use your site with confidence)
Good luck and happy hosting!