Skip to content

App URLs and Custom Domains on Varity

Varity Team Core Contributors Updated August 2026

Every Varity deployment gets a public URL based on its hosting type: static apps are served at https://varity.app/{name}/, and dynamic apps get their own subdomain at https://{name}.varity.app/. You can also attach your own domain to a deployment. This guide covers both.

When you run varitykit app deploy, Varity registers a name for your app from your project’s name. The resulting URL depends on hosting type:

# Static apps: served on a sub-path
https://varity.app/{your-app-name}/
# Dynamic apps: served on their own subdomain
https://{your-app-name}.varity.app/

Your app name is derived from the name field in your package.json by default. You can override it with the --name flag.

Pass --name to choose your subdomain at deploy time:

Terminal window
varitykit app deploy --name my-app

Your app will be available at the URL for its hosting type:

# Static app
https://varity.app/my-app/
# Dynamic app
https://my-app.varity.app/
  • Lowercase letters, numbers, and hyphens only
  • 3-48 characters
  • Must be unique across all Varity apps (first to register a name owns it)
  • Cannot start or end with a hyphen

You can point a domain you own at a deployment. Both subdomains (app.example.com) and root domains (example.com) are supported.

  1. Open your deployment in the dashboard and find the Custom domain card.

  2. Enter the hostname you want to use and attach it. Varity responds with the exact DNS records to create.

  3. Create those records at your DNS provider, then return to the card and run the verification check.

Attach a hostname with PUT /deployments/{deployment_id}/domain:

Terminal window
curl -X PUT https://varity.app/api/deployments/$DEPLOYMENT_ID/domain \
-H "Authorization: Bearer $VARITY_API_KEY" \
-H "Content-Type: application/json" \
-d '{"hostname": "app.example.com"}'

Read the current state at any time:

Terminal window
curl https://varity.app/api/deployments/$DEPLOYMENT_ID/domain \
-H "Authorization: Bearer $VARITY_API_KEY"

The response tells you whether the deployment supports a custom domain, and returns the record it is waiting for:

{
"supported": true,
"domain": {
"hostname": "app.example.com",
"recordType": "cname",
"recordName": "app",
"expectedCname": "your-app.varity.app",
"state": "pending_dns",
"dns": { "status": "pending" },
"certificate": { "status": "pending" },
"serving": { "status": "pending" }
}
}

The records depend on whether you are attaching a subdomain or a root domain. Use the values returned by the API rather than copying the examples below.

A subdomain routes with a single CNAME record pointing at the value in expectedCname:

TypeName (Host)Value
CNAMEappexpectedCname

Wildcard hostnames, IP addresses, and reserved or private-suffix hosts cannot be attached.

After the records are live, ask Varity to observe DNS and confirm the domain serves over HTTPS:

Terminal window
curl -X POST https://varity.app/api/deployments/$DEPLOYMENT_ID/domain/verify \
-H "Authorization: Bearer $VARITY_API_KEY"

The domain moves through these states:

stateMeaning
pending_dnsWaiting for your DNS records to resolve to the expected values
certificate_pendingDNS is verified; the certificate is being issued
activeThe domain is serving your app over HTTPS
errorA check failed; see errorCode

The dns, certificate, and serving blocks each carry their own status and checkedAt, so you can see which stage is outstanding. When DNS resolves to something other than the expected value, dns.status is mismatch and the observedCnames, observedA, and observedTxt fields show what Varity actually saw. That is usually the fastest way to spot a typo or a record left in place from a previous host.

Two error codes are reported: dns_lookup_failed when the records cannot be resolved, and https_verification_failed when the hostname does not yet serve over HTTPS.

Detach the hostname to free it for another deployment:

Terminal window
curl -X DELETE https://varity.app/api/deployments/$DEPLOYMENT_ID/domain \
-H "Authorization: Bearer $VARITY_API_KEY"

Your app stays reachable at its varity.app URL.

List the varity.app names registered to your account:

Terminal window
varitykit domains list

Output:

Your Domains (2)
┌─────────────┬──────────────────────────────────┬──────────────────┐
│ Subdomain │ App URL │ App Name │
├─────────────┼──────────────────────────────────┼──────────────────┤
│ my-app │ https://varity.app/my-app │ my-app │
│ my-other │ https://varity.app/my-other │ my-other-project │
└─────────────┴──────────────────────────────────┴──────────────────┘

Redeploying with the same --name updates the existing deployment at that URL. Your domain stays the same:

Terminal window
# First deploy
varitykit app deploy --name my-app
# Update the app: same URL, no re-registration needed
varitykit app deploy --name my-app

An attached custom domain survives a redeploy. You do not need to re-create the DNS records.

All varity.app subdomains are served over HTTPS automatically, and certificates for attached custom domains are issued and renewed by Varity once DNS is verified. No certificate setup is required in either case.