Skip to content

Domains

What is a Domain?

Well, the answer to that question is two-fold.

Here's the ChatGPT version of what a domain is
In the context of the internet, a domain refers to a unique name or identifier used to locate a specific website or web application. In simple terms, a domain is a human-readable name that maps to an IP address, which is a unique numerical identifier assigned to each device connected to the internet. Domains are used to simplify the process of accessing websites and web applications, as users can remember and type in the domain name instead of the IP address.

A domain name consists of two parts: the top-level domain (TLD) and the second-level domain (SLD). The TLD is the part of the domain name that comes after the last dot, such as ".com" or ".org". The SLD is the part of the domain name that comes before the TLD, such as "patr" in "patr.cloud". In addition to the TLD and SLD, a domain name can also include subdomains, such as "blog.patr.cloud" or "docs.patr.cloud".

Domains are registered and managed by domain registrars, which are organizations authorized by the Internet Corporation for Assigned Names and Numbers (ICANN) to manage domain names. When you register a domain, you are essentially renting the right to use that domain name for a specified period, typically one to ten years. During this time, you have full control over the domain name, including the ability to set up and manage DNS records, which control how the domain name is translated to an IP address.

Overall, domains play a crucial role in the functioning of the internet by providing a human-readable way to locate and access websites and web applications.

As far as Patr is concerned, however, a domain is just one of those things you buy from registrars like GoDaddy, Namecheap, or Google Domains. Any domain you purchase from a domain registrar, (like our beloved example.com) is considered a domain. We support almost all TLDs out there (like .com, .net and .cloud of course, among the other hundreds).

In order to create a Managed URL or a Custom Domain to a Deployment or a Static Site, you need to first add a Domain to Patr.

Adding a Domain

In order to add a domain to Patr, first navigate to the Domains section.

Screenshot of side nav with domains selected

In the Domains section, click on the Add Domain button.

Screenshot of add domain button

In the "Add Domain" screen, enter your domain (example.com) in the Domain Name field.
Do not use a subdomain like hello.example.com. Enter the root domain, such as example.com instead. The subdomain can be used while creating a Managed URL.

Screenshot of add domain screen with values pre-filled

Choosing a nameserver

While adding a domain, you have two options:

  1. Use Patr nameservers
  2. Keep your existing nameservers

What is a nameserver?

Again, this is what ChatGPT has to say about Nameservers A nameserver is a specialized server that is responsible for translating domain names into IP addresses. When a user enters a domain name in their web browser, the browser sends a request to a nameserver to look up the IP address associated with that domain name. The nameserver then responds with the IP address, allowing the browser to establish a connection with the web server hosting the website or web application.

Nameservers play a critical role in the functioning of the Domain Name System (DNS), which is a hierarchical decentralized naming system for computers, services, or other resources connected to the internet or a private network. The DNS uses a distributed database to store information about domain names and their associated IP addresses, and nameservers act as the primary interface between users and the DNS.

Each domain name must have at least two nameservers associated with it, which are responsible for resolving queries related to that domain name. These nameservers can be operated by the domain owner, a hosting provider, or a third-party DNS provider. When adding a domain to PATR, you have the option to use existing domain registrar'stheir nameservers or transfer the domain and manage the nameservers directly.

In simple terms, a nameserver controls your DNS. If you want to create a DNS record, your nameserver will create one for you. In most cases, your domain registrar will provide one for you.

Here are the differences between Patr nameservers and the default nameservers from your registrar:

  • If your nameservers are on Patr, when you create a Managed URL, Patr can automatically create a DNS record for you, making sure that your DNS records are always up to date, regardless of the region(s) your Deployments are running on.
  • Patr automatically scales your nameservers globally to make sure it is always highly available to all users, regardless of their region.
  • Patr's nameservers also makes sure your applications respond faster by prioritising servers that provide IPv6 and HTTP/2 and HTTP/3.
  • Patr's nameservers provide advanced features like CNAME flattening to make sure you can add any DNS record, even at the root level, with the highest performance.

If you're unsure what to choose, select Patr nameservers, and Patr will manage the rest for you.

Once added, click on the Add Domain button and your domain will get added.

Verifying your Domain

Once your domain is added, it needs to be verified before it can be used within Patr.

Verifying a Domain with existing NameServers

In order to verify a domain that uses existing nameservers, you will need to add a DNS record that validates your domain name. In your domain list, click on your domain.

Screenshot of domain list with not-verified domain

In the top right corner, click on the Verify? button.

Screenshot of Verify? button in an external domain

In the next screen, you'll get a verification value to create a DNS record for.

Screenshot of instructions to verify an external domain

Login to your domain registrar, and add the following DNS record:

Record Type Record Name Record Value TTL
TXT patrVerify <your verification value> Auto (leave at default)

Once the DNS record is added, wait for the DNS record to propogate to all nameservers. This usually shouldn't take more than an hour or two. Once your DNS record is propogated, your domain will automatically be verified. You can also click on the Verify button on Patr to manually verify your domain.

For examples on how to add a DNS record for popular registrars, you can follow these guides:

Transferring a Domain to Patr nameservers

Note: As soon as your domain is verified, Patr's DNS records will become active. In order to prevent any downtime, it is strongly recommended to add any DNS records you currently have on your registrar to Patr as well, before starting the verification process. You can find instructions for adding DNS records on Patr below.

In order to verify a domain that uses Patr nameservers, you'll need to add Patr's nameservers in your domains registrar:

  • Login to your domain registrar (this is where you bought the domain from).
  • Select your domain
  • Choose the Nameservers section.
  • In the Nameservers section, choose "Custom Nameservers"
  • Add the following two nameservers:
    • ns1.patr.cloud
    • ns2.patr.cloud

Once added, click on save, and wait for the nameserver change to propogate. This usually happens pretty quickly. Once your DNS record is propogated, your domain will automatically be verified. You can also click on the Verify button on Patr to manually verify your domain.

For examples on how to update nameservers for popular registrars, you can follow these guides:

Adding DNS records

Once you've chosen Patr nameservers for your domain, you'll have the option to add your DNS Records rightaway.

What are DNS Records?

DNS records are the mappings for which domain points to what IP address. In order to add a DNS record on Patr, follow these steps:

  • Navigate to the Domains section in the side-nav

Screenshot of sidenav with domains selected

  • Select your domain

Screenshot of domains list with at least one internal domain

  • Now click on the Add DNS Record button

Screenshot of Add DNS Record highlighted

  • Fill in the following fields:
    • Type: Here you can specify the type of DNS Record you would like to create. The most commonly used types of DNS records include:
    • A record: Also known as address record, A records map a domain name to an IPv4 address.
    • AAAA record: Also known as quad-A record, AAAA records map a domain name to an IPv6 address.
    • TXT record: TXT records are used to provide additional information about a domain, such as SPF records for email authentication, etc.
    • MX records: MX records specify the mail exchange servers that are responsible for accepting incoming email messages for a domain.
    • CNAME records: CNAME records are used to alias one domain name to another. For example, a CNAME record could be used to point www.example.com to example.com.
    • Name: Add your subdomain out here or use @ for the root domain. For example if your site's URL is blog.example.com, add blog in the Name field. If it's only example.com, leave the Name field with the default value @.
    • Target: Fill this field with whatever your DNS Record is pointing to. In case of an A record, you can enter the IPv4 address, for example.
    • TTL: TTL, or time to live, is a value included in DNS records that specifies how long a client should cache the record before requesting a fresh copy from the authoritative nameserver. This helps to reduce the load on the nameserver and improve performance by allowing resolvers to cache DNS records for a period of time. Unless you need a specific TTL, you can leave this at auto.
    • Proxied: This determines if your DNS record should be proxied by Patr's firewall or not.
  • Once you're done adding all values, click on Save.

Add DNS records

Deleting a Domain

This is a destructive action and will result in a loss of all DNS records. Please think twice before doing this.

If you're sure you want to delete your domain, you can click on the Delete button in a domain, and a confirmation will be shown to you. Enter the name of the domain and the domain will be deleted.

Further Reading

Creating a Managed URL
Custom Domains
Zero Downtime Deploys