Skip to content

Owning a Domain

Approximate Time: 10 minutes (not including hours of agonizing over a name)

Approximate Cost: $10-20/year


Buying a Domain

Buying a domain is a first step towards having a place on the web that belongs to you.

While it is possible to host a site at a subdomain of a host like https://example.github.io or https://example.netlify.app, you're tying your future to the future of those offerings. A price increase, policy change, or shutdown can take your content offline. Even if you can find and update most links to your new domain, there will be links outside of your control (a printed resume, people's bookmarks, etc.), and those will no longer resolve to your new site.

With your own domain name, you can opt to use whichever service you want with minimal disruption to your readers/users. You can point your domain at your existing GitHub site today, and whatever new service you want tomorrow. There will be no need to worry about broken links when you change hosts.

Picking a Registrar

Owning a domain name requires paying a yearly fee to a domain registrar. Registrars work as an intermediary between users and the registry that controls your chosen top-level domain (TLD).

While it is important to pick a trustworthy registrar, most registrars offer nearly identical services and very similar prices. (Within a few dollars of one another for most domains.)

If you are picking a registrar, we recommend Porkbun. They offer competitive prices, free privacy protection, an easy-to-use UI, and helpful customer service.

It is possible to transfer domains between registrars without much trouble, so don't overthink it!

Choices?

There are a lot of choices to make: registrar, host, operating systems, various third-party services. It can be overwhelming.

To help, our guides typically make a general recommendation that we think is a safe choice for most people as well as a few alternatives to consider.

Our resource guide also provides other reasonable choices you can consider:

More Registrars

Two-Factor Auth

You should use a secure password that you don't use anywhere else and always turn on two-factor auth at your registrar.

If someone obtains access to your registrar account they can hijack your domains: taking your web traffic, email, and any other services you decide to host.

How Much to Pay?

Each registrar has a domain search where you can look for available domains—you'll notice that the prices of different domains may vary quite a bit.

There are three factors that affect the price of a domain:

  • The top-level domain or TLD (.com, .org, .biz, .pizza, ...) - the owner of the TLD sets the base price & policies for the domain. Most range from $5-50, with "trendy" TLDs sometimes going for more.
  • Some domains, particularly short ones or ones that use common words, are considered "premium" and will have an additional cost. This can be hundreds or even thousands of dollars.
  • Sometimes you will see domains that are being resold, domains that someone has already bought and is trying to flip for profit. Avoid these: prices are inflated and can come with a reputation risk from whatever was there before (spam, blacklisting).

Unless you feel very strongly about a particular domain, expect to spend $10-20.

Keep in mind there is a base cost & renewal price. Make sure you're aware of both before committing to a domain.

Renewal

Keep in mind this is a one-year price unless otherwise stated.

A TLD owner and/or registrar may choose to raise prices on renewal, but typically this is a modest increase. Read on for more details on how TLDs may differ.

Consider if you want your domain to auto-renew. If you are using the domain for email or a personal site, you wouldn't want the domain to lapse & be grabbed by someone else. If this is the case, set up auto renew and keep the credit card updated.

Registrars will send warning emails as expiration approaches, so if you prefer not to auto-renew just be sure to keep an eye out and/or set a calendar reminder.

Do TLDs Matter?

A question that often comes up during the domain search: does it matter which TLD I choose?

For most purposes, the answer is no. There are a few things it helps to be aware of.

The biggest difference is that each TLD has an administering authority that sets rules:

  • How much is renewal?
  • What content is allowed? (most TLDs are available for any use, but some have restrictions)
  • Is HTTPS required? A few newer TLDs (.dev, .app) require all sites to be HTTPS. (For most uses this isn't a big deal, as your site probably should use HTTPS, but worth knowing.)
  • Is WHOIS information public?

The final one is something to consider.

When registering a domain you have to provide your personal information for legal reasons. Historically this information wound up in a public "WHOIS" registry, which often isn't desirable for privacy and spam reasons. Most registrars will hide this information on your behalf, listing themselves as a proxy owner, and forwarding any legal contacts to you as required.

Some TLDs, however, require that the owner's information is on file and public, meaning owning these domains anonymously is not possible. (Notably this is true of the .us TLD.)

Things You Shouldn't Pay For

Most registrars will offer additional services during registration: hosting, email, domain privacy, SSL certificates, etc.—don't pay for any of these, at least for now.

Typically it is best to use other services for email and hosting; if you do want to use your registrar's services you can always add them later. Domain privacy should be included for free (as it is with Porkbun and our other recommendations). There is no reason you should be paying for an SSL certificate these days. The guides to Static Hosting and Dynamic Hosting include steps for free SSL certificates.

Managing Your DNS Records

DNS, or the Domain Name System, is the phonebook of the web. When you enter https://www.example.com into the browser, your computer asks DNS what server to route the request to.

You can control DNS records for your domain as well as any subdomains you wish to create. Subdomains are free and can be used to route different applications or pages to different servers without registering additional domains.

You'll log in to your domain registrar to manage these DNS records.

For the most part, this guide and others you may follow will give specific instructions like "Create a TXT record named example.yourdomain.com with value '39702a4307498bb92e038a' and set the TTL to 600 seconds." While you can probably follow those steps without a full understanding, this section aims to demystify what they mean.

The most common kinds of DNS records are:

  • A: A records point a domain or subdomain to an IP(v4) address. If you decide to host a dynamic web application, the section Configuring your Server: Configuring DNS has an example of configuring an A record.
  • AAAA records are similar to A records but for pointing a domain name to an IPv6 address.
  • CNAME records allow you to point a subdomain to another domain name, for example you could point myapp.example.com at myapp.github.io.

You'll also sometimes be asked to create records like TXT records to verify your domain, MX records if you set up your own email, and half a dozen more less commonly used record types.

In addition to the type, each record consists of:

  • an optional subdomain, the sub in sub.example.com
  • a TTL, the number of seconds a record should be cached; in practice many systems will cache longer than this, but in general it is OK to leave as-is unless you have a good reason to modify it
  • a value, typically the IP address or domain name a record should resolve to
    • TXT records will often have unique non-domain/IP values. You may be asked to create these when setting up third party services that need to verify your domain.
  • most registrars (like Porkbun) will also give you a notes field to document why things are set the way they are

As an example, DNS records for a domain might look like this:

Type Host Value TTL Purpose
A @1 192.0.2.10 600 example.com resolves to server at that address
AAAA @ 2001:db8::10 600 IPv6 version of above
A api 192.0.2.20 600 api.example.com resolves to a different server
CNAME docs example.github.io 600 docs.example.com uses GitHub Pages
TXT @ site-verification=ajd2029kldfj 600 Proves ownership of domain to a third party that provided the unique token.
MX @ mail.kagi.com (priority: 10) 600 Sends @example.com email to your email provider

Migrating to a New Registrar

You are not locked into your choice of registrar. It is possible to migrate your registration and DNS records to another registrar that offers a better price or features.

There is a multi-step process to do this transfer:

  1. Copy DNS settings: Before you start, copy down all DNS entries from the original registrar. (An export or screenshot is fine.)
  2. Unlock the domain: Most registrars require "unlocking" a domain for transfer to prevent accidental/unauthorized transfers. Search the original registrar's site for "unlock domain" and ensure this setting is off.
  3. Request transfer code: The new registrar will need a unique code from the old registrar to confirm that you authorized the request. Search your original registrar's site for "transfer code" for instruction on how to obtain a unique code for your domain.
  4. Initiate transfer: From the new registrar's website, initiate a transfer. This typically requires paying for a one year renewal. (This will extend the time remaining on your domain registration by a year.) During this process the new registrar will confirm with the old registrar that your domain is unlocked and that the transfer code provided is valid. (This can take a day or two.)
  5. Ensure new DNS is set: Ensure that the new registrar has the same DNS entries as the old. Do this immediately to avoid downtime.
  6. Confirm the transfer request: Your old registrar may email you to confirm that you wanted to transfer the domain. That email sometimes takes a day or two to arrive, but once it does, accepting it will speed up the transfer. If it is not accepted the transfer should complete after ~5 days.

  1. @ means the root domain (example.com itself). Some registrars use a blank host instead. ↩