Every environment on the Stack Harbor PaaS gets a platform-issued URL of the form <envname>.region.stackharbor.cloud. You can keep using that URL, but most production applications need a domain you own — app.example.com, api.example.com, the root example.com — pointing at the environment.
This page covers the three pieces of that: the DNS record you create at your registrar, the binding step in the dashboard (when needed), and which record type to pick depending on the environment topology.
Vocabulary
- Domain — the name typed into the browser. The far-right part (
.com,.org,.ca) is the top-level domain (TLD); the part before it is the second-level domain (SLD). - Root domain — second-level plus top-level only (
example.com). Subdomains sit in front, separated by a period (app.example.com). - DNS — the system that converts a textual domain into the IP address of the server that answers for it. Changes to DNS records can take up to 48 hours to propagate.
The platform also supports internationalized (IDN) and generic top-level (gTLD) names — see the separate page on that.
Three steps
- Buy a domain at a registrar (or use one you already own).
- Create a DNS record at your registrar pointing at your environment.
- If you do not have a public IP attached to the environment, bind the domain in the dashboard so the shared load balancer can route traffic to it.
Which DNS record to use
There are three record types you can choose from. The right one depends on your topology and what kind of address you want to expose.
| Record | What it does | When to use |
|---|---|---|
| A record | Maps a hostname directly to a public IPv4 address. | Environment has a public IP attached to its entry point. Recommended for production. |
| CNAME | Aliases your hostname to another hostname (your platform-issued environment URL). | Environment does not have a public IP — traffic goes through the shared load balancer. Domain binding required in the dashboard. |
| ANAME (where supported) | Like CNAME, but works at the root of the domain (example.com, not just www.example.com). | You want the apex example.com to point at a hostname instead of an IP. Not all registrars support ANAME. |
A records and ANAME records do not need any binding in the dashboard. CNAME does — see the next section.
Configuring a DNS record at the registrar
The steps vary by registrar, but the shape is identical:
- In your registrar’s DNS settings for the domain, find the Records or DNS Management section.
- Click Add Record.
- Pick the type:
- A record — set Host to
@(or the subdomain), Points to to the environment’s public IPv4. - CNAME — set Host to the subdomain, Points to to your platform-issued environment URL.
- ANAME — set Host to
@, Points to to your platform-issued environment URL (or another root domain).
- A record — set Host to
- Pick a TTL (time-to-live) for the record. Lower values propagate changes faster but increase DNS query volume. One hour is a reasonable default for production.
- Save.
DNS changes can take up to 48 hours to take effect everywhere on the internet, though most resolvers pick up the change within an hour.
Bind the domain in the dashboard (CNAME and ANAME only)
When traffic to your environment goes through the shared load balancer (no public IP), the load balancer needs to know that your custom domain belongs to your environment, so it routes the request correctly.
- In the dashboard, click the Settings (wrench) icon for the environment.
- Open Custom Domains.
- Add your domain name and save.
If you have a public IP attached, traffic bypasses the shared load balancer and arrives directly — no binding needed.
Examples
-
A record, environment with public IP
api.example.com → 198.51.100.10app.example.com → 198.51.100.10
-
CNAME, environment without public IP (binding required)
app.example.com → myenv.region.stackharbor.cloud
-
ANAME, root domain pointed at a hostname
example.com → myenv.region.stackharbor.cloud- Subdomains resolve to the same suffix on the target.