# Domains and DNS

> What a domain name is, how DNS turns it into the address of your server, and how nameservers, zones and records fit together.

Source: https://www.coritan.com/docs/learn/domains-and-dns/

A *domain* is a name such as `example.com` that people type to reach your website or to send you mail. Computers find each other by numeric *IP addresses*, such as `203.0.113.10`, and the *Domain Name System* (DNS) is the directory that turns a name into an address.

## Registering a domain

Each ending, such as `.com`, is run by a *registry*. You register a domain through a *registrar*, and the domain stays yours for the period you pay for. Coritan registers domains for 1–10 years at a time, and renews them for you while auto-renew is on ([How domain registration works](/docs/websites/domains/)).

The registry also keeps a list of the *nameservers* for each domain: the servers that answer DNS questions about it. You choose them at the registrar.

## How a name becomes an address

When someone opens `www.example.com`, their device asks a *resolver*, a DNS server that their internet provider or network usually runs. The resolver asks the registry which nameservers answer for `example.com`, asks one of them for the address of `www.example.com`, and passes the answer back. The browser then connects to that address.

The resolver keeps the answer, so the next person who asks it gets the answer at once. The answer's *TTL* (time to live) says how many seconds the resolver may keep it.

## Zones and records

The nameservers answer from the domain's *zone*: its list of *records*. Each record has a name, a type, a value and a TTL. These are the types you meet first:

| Type | What it says | Example |
| --- | --- | --- |
| `A` | The IPv4 address of a name | `www` points to `203.0.113.10` |
| `AAAA` | The IPv6 address of a name | `www` points to `2001:db8::10` |
| `CNAME` | A name is another name | `shop` points to `shops.example.net` |
| `MX` | The servers that take the domain's mail | `@` points to `mx1.mail-fra.coritan.com` |
| `TXT` | Text that other services read, such as the list of servers allowed to send your mail | `@` holds `v=spf1 include:_spf.mail-fra.coritan.com -all` |

A name in a zone is written relative to the domain: `www` means `www.example.com`, and `@` means `example.com` itself. A name under your domain, such as `shop.example.com`, is a *subdomain*, and you create one by adding a record for it. [DNS record types](/docs/websites/dns/record-types/) lists every type Coritan hosts.

## Why a change takes time to reach everyone

Coritan's nameservers serve a change as soon as you save it. A resolver that already holds the old answer keeps it until its TTL runs out, so some visitors see the change later than others. Before a planned move, lower the record's TTL a while ahead, so that the old answer expires sooner. A TTL can be from 60 seconds to one day ([TTL](/docs/websites/dns/#ttl)).

Nameservers work the same way. After you change a domain's nameservers, resolvers keep asking the old ones until their cached answer expires ([Change a domain's nameservers](/docs/websites/domains/change-nameservers/)).

## DNS at Coritan

- A domain you register on the **Websites** page starts on Coritan's nameservers, `ns1.coritan.com` to `ns8.coritan.com`, with a zone on your account ([Register a domain](/docs/websites/domains/register-a-domain/)).
- For a domain registered somewhere else, add it to your account, then set its nameservers to Coritan's at its registrar ([Add a domain you already own](/docs/websites/add-an-existing-domain/)).
- You edit a zone's records on the domain's **DNS** tab. Coritan signs each zone with DNSSEC from the moment you add it, which lets resolvers check that an answer came from the zone unchanged. You can switch signing off on the domain's **Settings** tab ([Set up DNSSEC](/docs/websites/dns/dnssec/)).
- An `A` or `AAAA` record can be *proxied*. Coritan then answers with the addresses of its edge, which serves the site over HTTPS and checks each request before it reaches your server ([Web proxies, origins and the WAF](/docs/learn/web-proxies/)).

## Next steps

- [Put a website online](/docs/get-started/put-a-website-online/), from a domain to a site served over HTTPS
- [Register a domain](/docs/websites/domains/register-a-domain/)
- [Add, edit and delete DNS records](/docs/websites/dns/manage-dns-records/)
- [Set up email for your domain](/docs/get-started/set-up-email-for-your-domain/)
- The [Domains](https://www.coritan.com/websites/domains) and [DNS](https://www.coritan.com/websites/dns) product pages on coritan.com
