How to connect your own domain
Connect a domain you own to a published Playcode project. The exact DNS setup depends on whether you published a static site or a cloud app - this guide covers both.
Before you start: publish the project first and make sure your plan includes custom domains.
First: which kind of project are you connecting?
Playcode has two ways to publish, and the DNS setup differs for each. Pick the one that matches:
| Project type | What it is |
|---|---|
| Static site (Playcode Pages) | A single-page site, landing page, portfolio, or anything built with HTML + JS that runs entirely in the browser. Your published URL looks like my-site.playcode.io. → Jump to DNS setup for static sites |
| Cloud app (Playcode Cloud) | A full-stack app with a backend, database, or anything that runs server-side. Your published URL looks like my-app.playcode.ai (notice the .ai - different from Pages above). → Jump to DNS setup for cloud apps |
Not sure? Look at the URL your project shows when published. If it ends in.playcode.io, you have a static site (Pages). If it ends in.playcode.ai, you have a cloud app.
Where to buy a domain (if you don't have one yet)
We recommend Cloudflare Registrar. It is the easiest option for Playcode users:
- Cheapest prices - Cloudflare sells domains at cost, no markup.
- CNAME flattening - works perfectly with root domains (more on this below).
- Simple DNS management - everything in one place.
Other popular options: Namecheap, Porkbun, GoDaddy. They all work with Playcode, but Cloudflare makes the DNS setup easiest.
Static sites - DNS setup
For Pages projects (*.playcode.io), all sites share one Playcode server. You point your domain at app.playcode.io.
Option A: CNAME record (recommended)
This is the best option. Use it if your DNS provider supports it.
| Setting | What to enter |
|---|---|
| Type | CNAME |
| Name | @ for the root domain, or www for www.yourdomain.com |
| Target | app.playcode.io |
About root domains and CNAME: the DNS standard does not allow a CNAME on a root domain (yourdomain.comwithoutwww). Cloudflare supports it through "CNAME flattening" - it just works. Most other providers (GoDaddy, Namecheap) do not. If yours cannot, use Option B for the root.
Option B: A record (root domain, if CNAME flattening is not available)
If your provider does not allow a CNAME on the root domain, point an A record at our static server.
| Setting | What to enter |
|---|---|
| Type | A |
| Name | @ |
| Value | 88.198.232.54 |
Cloudflare users: set these records to DNS only (gray cloud). If the orange proxy is on, Cloudflare tries to serve the certificate instead of Playcode, and SSL will not work.
Cloud apps - DNS setup
For Cloud projects (*.playcode.ai), use the in-app setup wizard. It gives you the exact DNS record to add, verifies ownership automatically (no separate TXT record needed), issues the SSL certificate, and emails you when the domain is live.
Recommended setup
Use www.yourdomain.com first. It works on every major DNS provider with a CNAME record and avoids the root-domain limits some providers have.
- Open the project in Playcode and click Publish.
- Open Custom domains and click Set up custom domain.
- Enter
www.yourdomain.com. - Copy the DNS record the wizard shows into your DNS provider.
- Return to Playcode and click Check again.
The record the wizard asks for
Just one - a single routing record. Playcode confirms you own the domain automatically the moment that record resolves, so there is no separate TXT ownership record to add.
| Record | Purpose | What to copy |
|---|---|---|
| CNAME, ALIAS, or ANAME | Routes visitors to Playcode Cloud (and proves ownership automatically). | The Name and Value shown in the wizard. |
For cloud apps, do not add IP-address (A) records. The wizard routes by DNS name, so Playcode can move infrastructure without ever asking you to change DNS targets. (Static sites above are the exception - that path still uses an A record.)
Root domains
A root domain is yourdomain.com without www. Some providers can point a root at a DNS name (CNAME flattening, ALIAS, or ANAME); others cannot. If yours cannot, use www.yourdomain.com.
| DNS provider | Best path | Note |
|---|---|---|
| Cloudflare | www CNAME. Root works with CNAME flattening. | Best option for root domains. |
| Namecheap, Porkbun, DNSimple, Gandi, DreamHost, ClouDNS, NS1 | www CNAME. Root works with an ALIAS record. | Use the record type shown by the wizard. |
| Name.com, DNS Made Easy, easyDNS | www CNAME. Root works with an ANAME record. | Use the record type shown by the wizard. |
| GoDaddy, DigitalOcean | www CNAME only. | Root domains need a flattening provider. Move DNS to Cloudflare to use a bare root. |
| Amazon Route 53, Google Cloud DNS, Azure DNS | www CNAME only. | Their alias records only point at their own AWS/Google/Azure resources, not at Playcode, so the root cannot reach us. Use www or move DNS to Cloudflare. |
Provider tips
Cloudflare
- Open your domain in Cloudflare, go to DNS, click Add record.
- Add the CNAME (or root-domain) record from the Playcode wizard.
- Leave the record proxied (orange cloud) - Playcode issues the certificate.
- Save, then return to Playcode and click Check again.
Namecheap, Porkbun, DNSimple, Gandi, DreamHost, ClouDNS, NS1, Name.com, DNS Made Easy, easyDNS
- Open your DNS records page.
- For
www, add the CNAME record shown by Playcode. - For a root domain, use the ALIAS or ANAME record the wizard shows for your provider.
- Save, then return to Playcode and click Check again.
GoDaddy and DigitalOcean
Use www. These providers do not support the root-domain flattening that cloud apps need, and Playcode does not hand out a root redirect IP for the cloud path. To use a bare root, move DNS to a flattening provider such as Cloudflare.
Amazon Route 53, Google Cloud DNS, Azure DNS
Use www. These services do offer root-domain alias records, but those aliases can only point at the provider's own resources (AWS CloudFront/S3, Google resources, Azure Front Door), never at an external host like Playcode. So they cannot connect a bare root to a cloud app. To use a bare root, move DNS to a flattening provider such as Cloudflare.
Common mistakes
The wizard says the record is missing
- DNS can take a few minutes to publish. Wait, then click Check again.
- Make sure you added the record to the domain's authoritative DNS provider.
- Do not type
https://in the DNS Name field.
The wizard says the record is wrong
- Replace the DNS Value with the exact value shown by the wizard.
- If your provider appends the zone automatically, use the short Name -
www, notwww.yourdomain.com. - Remove old IP-address or conflicting CNAME records for the same name.
Ownership is taking a while to verify
Ownership is confirmed automatically once your routing record resolves - there is no TXT record to add. If it stays unverified, double-check that the routing record's Name and Value match the wizard exactly, then click Check again.
SSL is still validating
Leave the domain in Playcode. You can close the wizard - Playcode keeps checking and emails you when the hostname and SSL certificate are active.
Quick summary
- Static sites (
*.playcode.io): CNAME toapp.playcode.io, or A to88.198.232.54for the root. - Cloud apps (
*.playcode.ai): use the in-app wizard - start withwww.yourdomain.com. - Copy the wizard's routing record exactly - ownership is verified automatically, no TXT record.
- Cloud root domains need CNAME flattening, ALIAS, or ANAME; otherwise use www.
- On Cloudflare: static sites use DNS only (gray cloud); cloud apps leave the record proxied (orange) - the certificate is issued automatically.
Still stuck? Chat with us from Playcode and include the domain name plus a screenshot of your DNS records.
Related Articles
Need more help?
Can't find what you're looking for? Chat with us or send us an email.