githubEdit

Domains & DNS

This section will guide you on how to register for a domain, but we will not be explaining in depth how DNS works.

Domain Names

So, now we’ve got a server up. But you notice an IP address is kind of ugly and hard to remember… that’s where domain names come into play! If you’ve ever typed a website URL, you’ve effectively typed a domain name.

Well, how do IP Addresses turn into domain names? All you need to know is there are a lot of servers out there maintaining a large table of IP addresses to domain name mappings. These are known as DNS servers.

Getting your own domains

If you have the Github Student Developer Pack, you should be able to get a domain name from .tech for free for a year.

If you want to get a cool domain name, you can use this to compare prices from different registrars:


Every domain will have the following structure

For every domain, you can also have a bunch of records for subdomains


Shifting DNS Nameservers to Cloudflare

Why is this necessary?

  • Performance - Fast global DNS resolution

  • Free DDoS protection - Protect your websites against attacks

  • CDN & caching - Faster worldwide content delivery

  • Free SSL - HTTPS Websites

How do I do this?

1

In the domain registar > "Manage Nameservers"

2

Delete Existing Nameservers

Delete all of them, as we will be migrating to Cloudflare's

3

Cloudflare > Domain Management > "Onboard a domain"

4

Enter the domain name

5

Cloudflare will give you the nameservers to update

In this case, it is dean.ns.cloudflare.com , and sue.ns.cloudflare.com

6

Update registar with Cloudflare DNS

Congrats, your website will be part of Cloudflare's next outage! 🤞

This will likely take a 5-10 minutes to update.

chevron-rightAdditional: Configuring your own DNS Recordshashtag

We’ll start by creating a bunch of A records:

  • Leaving the hostname blank will just lead to the main domain

  • Add * as the hostname will route all empty subdomains to a single address

  • Time to Live (TTL) is a field on DNS records that controls how long each record is valid and — as a result — how long it takes for record updates to reach your end users.

Additional Reading

Fun reading behind the names of Cloudflare Name Servers:

Last updated