Buying a domain and pointing it at your application is a short job surrounded by unfamiliar terminology, and most of the difficulty is that nothing behaves immediately and nothing explains why.
What are the pieces?
- A registrar. Where you buy and control the domain.
- DNS records. Which point the name at an address.
- A certificate. Which enables the secure connection.
- The platform configuration. Telling it to answer for your domain.
Which records do you need?
Usually one pointing the bare domain at your platform and one pointing the www version, or a redirect between them. Platforms document exactly what they want, and following their instructions rather than general advice is the fastest route.
Where a platform gives you a name rather than an address, that is a record type that follows another name, which is why the two are not interchangeable.
Why does nothing happen immediately?
Because DNS answers are cached at every level between you and the source, and each level holds them for a set period. A change can appear for one person and not another for hours.
Setting a short cache period before making changes reduces this, and it has to be done in advance to help.
How do you check it actually worked?
Query the record directly rather than loading the site, since your browser and your machine both cache aggressively. Command line tools and online checking services both do this, and they answer the question your browser cannot.
What about certificates?
Handled automatically by nearly every modern platform, issued free and renewed without intervention. This was genuinely difficult and is now usually a checkbox, which is one of the clearer improvements in this area.
Where you do have to manage it yourself, automated renewal is the part to get right, since an expired certificate makes a site unreachable and does so silently until it happens.
What is worth configuring beyond the basics?
A redirect so that one version of the address is canonical, and forcing secure connections so that anything arriving over an insecure one is redirected. Both are single settings on most platforms and both prevent a category of confusion later.
What should you avoid?
Buying the domain through your hosting provider by default. Keeping the registrar separate makes it considerably easier to move hosting later, and moving a domain between registrars is a slow process with a waiting period.
Setting a long registration period and enabling auto-renewal is worth doing at purchase, since a lapsed domain can be picked up by somebody else and recovering it is difficult or impossible.
What are the common mistakes?
Editing records at the registrar when the domain uses a different provider's nameservers, which means the changes have no effect. Also mixing record types on the same name, which is invalid and produces inconsistent behaviour.
Here are my current DNS records and here is what my hosting platform asked for. Tell me what is wrong, what is missing, and what each record actually does.
What about email records on the same domain?
Worth setting up in the same session, since they live alongside the records pointing at your application and are easy to get wrong separately. Sending authentication records, a policy record and a mail routing record if you want an address at the domain.
The interaction that catches people is adding a mail service later and finding that a record conflicts with something set up months earlier. Doing both at once, while the settings are in front of you and you remember which provider does what, is considerably easier than returning to it after the details have gone.
What is the practical order?
Deploy first and confirm it works on the platform address. Then add the domain, then wait, then check with a query tool rather than a browser. Doing it in that order means any problem has one possible cause rather than three.