How to deploy an AI-generated app to production
Move an AI-built app from a private draft to a live address, with a domain, search settings, tests and an export path.
Draft versus published: what visitors actually see
To deploy an AI-generated app you do not need a server, a build pipeline or a config file. You need to move it from the version only you can see to the version visitors get, give it an address, check it survives a phone, and decide what happens after launch.
Your app has two versions at all times. The draft is what the AI chat, Edit mode and version restores change, and only you can open it, at an address ending in --draft. The live version is what everyone else gets. Nothing visitors see changes until you press Publish.
The loop is short. Try the change on the Preview tab, which always shows the draft, then press Publish in the header. Publishing uses the build you just looked at rather than a description of it, so visitors get exactly what you saw. If the new version fails to start, your live app stays as it was. Publish is turned off while a change is running, or when the draft's latest build failed. The first working version of a new app goes live on its own, so there is an address to share from the start; every change after that waits for you. The mechanics are covered in publishing your changes.
The draft is not a sandbox. Records you add, change or delete there change them for your live app too, and new tables appear right away. Secrets and connected accounts are shared, so a function you try can really send an email. Automations, AI agents and workflows that a change adds or edits only start when you publish, and your tracking tags and automatic Vercel deploys follow the same rule.
Your app's address and connecting your own domain
Every published app has a Draftship address you can share immediately. A custom domain is what makes it look like a product, and it is available on Pro and Pro+.
- Open the project, select Domains, enter the domain and click Connect.
- At your DNS provider, add the CNAME record Draftship shows, pointing your hostname at the target it gives you. If your provider appends your domain to the name automatically, enter only the part before it, such as
app. On Cloudflare, set the record to DNS only. - Click Check DNS, or wait. Draftship rechecks every few minutes and shows Connected when the domain is ready. DNS changes can take up to an hour.
Root domains need care. A root like yourbrand.com needs a CNAME record because A records are not supported, and not every provider allows a CNAME at the root. If yours does not, connect www.yourbrand.com or another subdomain instead.
HTTPS is handled for you: Draftship issues a certificate and renews it automatically, usually a few minutes after the DNS record is correct. If the domain has CAA records, they must allow Cloudflare's certificate authorities. Full steps are in connecting a custom domain.
Search and sharing settings
Open Dashboard, then SEO. These settings go live as soon as you save: no rebuild, no AI message, no publish step.
- Title: the headline in search results and the browser tab of your home page. Aim for 10 to 60 characters.
- Description: the text under the title in results. Aim for 50 to 160 characters.
- Keywords: a few terms that describe the app.
- Social image: the picture shown when someone shares your link, at 1200 by 630. Generate makes one with AI.
- Hide from search engines: asks crawlers not to index the app while it is still in progress.
Write with AI reads your home page and drafts a title, description and keywords for you to review. The home page always uses your settings; other pages keep their own titles and descriptions and fall back to yours where they have none. Social tags apply to every page.
Every app gets /sitemap.xml and /robots.txt automatically, and branch previews are never indexed. With hiding turned on, both files tell crawlers to stay away.
Run SEO check loads each page the way a search engine sees it and reports missing or badly sized titles, pages without exactly one main heading, images without alt text, missing language and mobile settings, thin server-rendered text, and slow or failing pages. Fixes that need code changes come with a Fix with AI button. Google's SEO starter guide is worth reading once for how titles, descriptions and indexing fit together.
Checking it works before you announce it
The testing agent, on Pro and Pro+, writes browser tests for you. Go to Dashboard, then Tests, click Write tests, and either leave the box empty to cover the main flows or describe one, for example "a visitor can submit an idea and see it in the list". Each test is a readable list of steps: open a page, type into a labelled field, click a button, see some text.
Run all tests, or a single one. Each run starts in a fresh browser with no saved login and reports pass or fail, the step that broke, a screenshot of that moment and any browser console errors. Fix with AI sends the failure, the steps and the errors to the chat. Turn on running tests after every change and each new version is checked as soon as it builds.
Tests run against your real app and clean up after themselves: records and accounts created during a run are deleted, automations do not fire, emails are not really sent and test visits are not counted in analytics. AI features inside your app still run and count toward your limits. Clear labels make tests better and the app easier to use.
Then do a manual pass on a phone. Load the live address on a real device, tap through the main flow, check that forms work with the on-screen keyboard, and that a shared link shows the right title and image.
Watching it after launch
Analytics tags you have connected start counting only after you publish, and your own draft visits are excluded, so a flat first hour usually means the draft rather than a broken tag.
For errors, the testing agent is the closest thing to a log: failures come back with console output, and the SEO check flags pages that load slowly or not at all. MDN's overview of HTTP explains what happens between a visitor's browser and your app.
Exporting the code and deploying elsewhere
Publish first. GitHub and Deploy send the draft's files, so publish before you push if you want the repository to match what visitors see.
On Pro+, connect GitHub under Settings, then Integrations, and approve access. Clicking GitHub in the editor header creates a repository named after your project, private if the project is private, with the complete runnable project. Later pushes add a commit on the default branch.
Vercel works the same way: paste an access token for your account or team, then click Deploy. Draftship uploads the project to a Vercel project named after yours and starts a production deployment, passing your secrets and service key as environment variables. After the first deployment, every successful build deploys automatically until you clear Auto-deploy.
Exported code keeps its backend. The bundle includes .env.production pointing the SDK at your app's backend, so the database, users, functions' data access and integrations keep working outside Draftship. The code is yours. Details are in GitHub and Vercel.
A pre-launch checklist
- Publish, then open the live address in a private window, not the draft.
- Confirm the domain shows Connected and loads over HTTPS.
- Set the SEO title and description, add a social image, run the SEO check.
- Run the tests, or write your first one.
- Walk the main flow on a phone.
- Check that test records were cleaned up.
- Decide whether to hide the app from search engines until launch day.
- Connect GitHub or Vercel if you want a copy outside Draftship.
- Share the link.
Doing it with Draftship
Describe the app, try it on Preview and press Publish. Draftship writes the code, hosts it and gives it a database and sign-in, so the gap between an idea and a live URL is one button plus the checklist above. Build your first app, then take the domain, search settings and tests at your own pace.
Primary sources
- SEO Starter Guide: The Basics | Google Search Central | Documentation | Google for Developers · developers.google.com
- Overview of HTTP - HTTP | MDN · developer.mozilla.org
This article was drafted with AI assistance from the primary sources listed below and checked automatically against them. An editor hasn't reviewed it yet.