---
title: Handle apex domains and subdomains
description: Respect adapter capabilities without guessing public-suffix boundaries.
---

Domain SDK validates full hostnames but does not guess registrable apex domains with a two-label rule. Use `domains.capabilities.apexDomains` for provider support.

Railway apex instructions use ALIAS/ANAME or CNAME flattening. Vercel supports apex configuration. Cloudflare for SaaS exposes CNAME routing and reports apex support unavailable. Render accepts wildcard domains; other current adapters reject them.

For tenant hostnames under a domain you own, use [`createSubdomainClient`](/docs/guides/managed-subdomains) to constrain direct-child labels and choose wildcard or individual provisioning.

For the DNS side, including why the apex can't hold a CNAME and which record each platform asks for, see [Apex domains: A records, ALIAS, and CNAME flattening](/blog/apex-domain) on the blog.

Read next: [Provider overview](/docs/providers).
