Set up DNS
Nobody wants to remember the IP addresses of all the websites they visit. The Domain Name System (DNS) lets us use names instead. Once you purchase a domain name (like is404.net), you can add as many subdomains as you want to point to whatever IP addresses you want. I have purchased is404.net, and made a site that allows you access to create records on under that domain.
Prerequisites
Before you can set up DNS for your website, you need to have it ready:
- Set up a website with a public IP address (AWS EC2)
- Set it up with an IP address that doesn't change (Elastic IP on AWS)
Setting up DNS records for your website
I have set up a small website to allow you to create new DNS records under the is404.net domain.
A Record
- Navigate to https://dns.is404.net.
- The password to access the site is listed on LearningSuite.
- On this site are all the functions you need to CRUD some DNS records under the is404.net domain.
- You can create a new record by clicking "Create new record" on the homepage. You'll need to select the record type and put in the subdomain (e.g.,
rschuetzlerfor rschuetzler.is404.net). - You can search for specific records by typing the name of the record in the search page (including the is404.net part).
- You can edit records by selecting the edit option. Always make sure the record type matches the contents (i.e., IP address for
Arecords, domain name to point to forCNAME) - You can delete records, too. Be careful not to delete anything that's not yours.
- You can create a new record by clicking "Create new record" on the homepage. You'll need to select the record type and put in the subdomain (e.g.,
- Create a new A record that points to the elastic IP address you assigned to your server. The Name on the record should be
yournetid.is404.net, replacing "yournetid" with... your NetID. The Content should be your new Elastic IP address. - Wait a minute or two to make sure the DNS record you created gets put on the DNS server before moving on.
- Now that you have set up a domain name for your server, you can visit it with your browser by going to
http://yournetid.is404.net. Magic!
http rather than https - since we haven't set up HTTPS encryption for the site yet, CNAME Record
Unlike A records, which turn a name into an IP address, CNAME records turn a name into another name. This allows you to have multiple names for the same server, while only having to keep one IP address up to date. We'll set up a CNAME record to allow another domain name to point to your same website. Later we'll use this setup to point to two different websites on the same server.
- Now we want to give your server another name - because we can. Do this by creating a new CNAME record, with the Name of
yournetid-isawesome.is404.net, a type of CNAME, and Contentyournetid.is404.net. - Wait another minute to make sure the CNAME record makes it to Cloudflare's servers before you request any pages.
Make sure you can access your website from both domain names you set up for it: yournetid.is404.net and yournetid-isawesome.is404.net.