Start with what each name needs to communicate
A subdomain is a name beneath a domain, such as api.example.com beneath example.com. For application and service names, its main job is to give people a stable, recognizable way to reach something. A good scheme should help a teammate answer three questions: What service is this? Which environment is it? Is the name intended for users, other applications or administrators?
List the services you already operate or expect to add, then group them by purpose. You might have a public website, an account portal, an API and an internal monitoring dashboard. The list does not need to predict every future project. It should reveal repeated patterns so that the next name can follow an agreed rule rather than becoming an exception chosen in a hurry.
Choose a simple pattern for services and environments
One workable pattern puts the service first and adds an environment only when needed: api.example.com for a production API and api.staging.example.com for its staging counterpart. Another puts the environment first, as in staging.api.example.com. Either can work. Pick one order and use it consistently; otherwise, people may have to guess whether a name exists or search DNS records to find it.
Keep production names short when they are meant to be shared widely. Avoid building names from temporary project codes, individual team names or server numbers if those details may change while the service remains. The DNS name can stay stable even when the application moves to a different host or provider. If a service has a public and a private entry point, give them distinct names and document which is which rather than relying on a subtle abbreviation.
Make names readable without overloading them
Prefer familiar service words such as api, docs, status or assets over unexplained abbreviations. Use lowercase letters, numbers and hyphens for predictable names, and avoid names that differ only by a small spelling change. A convention such as billing-api.example.com can be useful when several applications each expose an API, but adding every detail to the hostname soon makes it hard to read.
Decide which distinctions belong in DNS and which belong in documentation or application routing. For example, separate hostnames may make sense when services have different owners or access policies. Paths such as example.com/help may be simpler when content belongs to the same website. DNS names identify entry points; they do not need to describe every feature behind them.
Plan for records, ownership and access
Before adopting a name, check whether it is already used by a DNS record or reserved for another purpose. Record the intended owner, purpose and environment alongside each name. Also note where the name points and whether that destination is managed by your team or a provider. This small inventory makes it easier to review records when applications move or are retired.
Treat naming and security as related but separate concerns. Calling a service internal.example.com does not make it private; access depends on network placement, authentication and other controls. Likewise, a staging hostname may still be reachable from the internet unless access is restricted. Be cautious with broad wildcard DNS records, which can make unintended names resolve and obscure missing records. Use explicit records when they make the inventory easier to understand.
Introduce the scheme without breaking existing links
If existing subdomains do not follow your new pattern, do not rename everything at once. Start by applying the convention to new services. For an old name that needs to change, identify its users and integrations first: bookmarks, application settings and automated clients may all depend on it. Where appropriate, keep the old name working during a transition and update the relevant documentation and configurations.
Review the scheme whenever a new service or environment does not fit it. An exception may signal a special requirement, or it may show that the rule is too complicated. A short written convention with a few examples, a record owner and a process for retiring names is more useful than an elaborate taxonomy nobody follows. The goal is not perfect uniformity; it is to make each hostname’s purpose understandable and its lifecycle manageable.



