> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mythos.new/llms.txt
> Use this file to discover all available pages before exploring further.

# Publish your site

> Build and deploy your project to a live, public URL at your-name.r21.dev — a short wizard for the URL, SEO, and review. Rename or unpublish anytime.

Publishing takes the project you've been building and puts it on the internet at a public address like
`your-name.r21.dev`. It runs a fresh production build of the project's repository, deploys the result, and
hands you a link you can share. A short three-step wizard walks you through it — pick the address, fill in
how the site looks when shared, then review and publish.

This is different from the **preview** you see while building. The preview is a private, temporary
sandbox only you can reach. Publishing produces a separate, durable build that anyone with the link can
open.

<Note>**Preview vs published site.** The **preview** in the workspace is private and tied to your build
session. The **published site** is a separate production build served from a stable `*.r21.dev` URL that
anyone can visit. Editing your project does not change the published site until you publish again.</Note>

<Note>**Publishing is free** — it doesn't spend credits. Only building (3) and editing (2) do.</Note>

<Warning>**Publishing makes your site public.** Once published, anyone with the link can open it — there's
no password or sign-in gate. Don't publish a site that shows private data, and check the secret scan
(below) before you share the link.</Warning>

## Why publish

* **Share a real link.** Send `your-name.r21.dev` to anyone — no Mythos account needed to view it.
* **A stable address.** The published URL doesn't change when you edit the project; it only updates when
  you publish again.
* **A true production build.** Publishing runs a fresh production build, separate from the dev preview.

## Prerequisites

* A generated project with a repository. If you've built something and can see a preview, you're ready.
  A project that hasn't been generated yet has nothing to build, so publishing is blocked until then.
* That's it — publishing itself does not spend credits (see [Credits & pricing](/introduction/credits-and-usage)).

## How to publish

The wizard itself is three steps — the panel header shows **Step 1 of 3** through **Step 3 of 3**.
Opening the panel and waiting for the build bracket those steps.

<Steps>
  <Step title="Open the Publish panel">
    In the workspace, open **Publish** from the top of the right panel. The wizard opens on the URL step.
  </Step>

  <Step title="Step 1 — Pick your URL">
    Choose the subdomain for your site — this becomes `your-name.r21.dev`. Edit it and Mythos checks
    availability as you type; a green **Available** means it's yours. Then select **Continue**.
  </Step>

  <Step title="Step 2 — Add site info (SEO)">
    Set the title, description, icon, and social image that show when your link is shared or found in
    search. Mythos pre-fills a suggested title and description from your site's content — accept them or
    edit. Select **Continue**. See [SEO & social previews](/publishing/seo) for what each field does.
  </Step>

  <Step title="Step 3 — Review">
    Check the URL, the site info, and the secret-scan note, then select **Publish**.
  </Step>

  <Step title="Wait for the build">
    Mythos builds and deploys your site. This usually takes under a minute. When it finishes you see
    **Your app is live!** with the URL, a **View app** button, and a **Share** action.
  </Step>
</Steps>

## What you see while it builds

Publishing is a build-and-deploy step, so there's a short wait. The panel reflects the state:

| State    | What you see                                     | What you do                       |
| -------- | ------------------------------------------------ | --------------------------------- |
| Building | "Publishing your site" with a spinner            | Wait — usually under a minute     |
| Live     | "Your app is live!" with the URL and View/Share  | Open the link, copy it, share it  |
| Failed   | An error message on the review step with a retry | Fix the issue, then publish again |

## Updating a published site

Editing your project after publishing does **not** change the live site automatically — the published
build is a separate snapshot. To push your latest changes live, open the Publish panel and select
**Update site**. It rebuilds from your current code and replaces the live version at the same URL.

<Tip>Editing in chat never touches the live site — it stays on its last published build until you select
**Update site**.</Tip>

## Renaming and unpublishing

* **Rename anytime.** Change the subdomain from the URL step whenever you like. The new address is live
  almost immediately and the old one stops resolving — no rebuild needed.
* **Unpublish.** Select **Unpublish** from the published panel. The site stops resolving and its files
  become unreachable, making it private again. You can publish it again later.

<Warning>Renaming frees the old subdomain and the old link stops working within seconds. Anyone holding
the old URL will get a "not found" page — re-share the new address.</Warning>

## The secret scan

Every publish runs an automatic scan of the built site for high-signal leaked credentials. It checks six
categories, reporting the matched label (never the value):

```
AWS access key
OpenAI secret key
Stripe live secret key
GitHub token
Slack token
Private key
```

The result appears on the review and live screens:

* **No leaked secrets detected** — you're clear to share.
* **Potential secrets in your bundle** — it lists the category above (never the value). Remove the secret
  from your code and publish again before sharing.

<Note>The scan reports categories, not the secret itself, and it doesn't block publishing — it's a
warning so you can fix a leak before handing out the link. It deliberately ignores public keys (like a
Supabase anon key) that are safe to ship in a frontend.</Note>

## Limitations & good to know

* **Frontend builds only.** A project that needs a live server — server-side rendering, API routes, or
  server actions — can't be served as a static site and the build will fail. Mythos apps are
  frontend-first (data lives in your connected Supabase), so most projects publish cleanly.
* **One live build per project.** Each project has one published site at one URL. Publishing again
  replaces it; it doesn't create a second copy.
* **No password protection.** A published site is fully public. There's no view gate — use Unpublish to
  take it down.
* **Custom domains aren't available yet.** Published sites live on `*.r21.dev` for now. See
  [Custom domains](/publishing/custom-domains).

## Troubleshooting

<AccordionGroup>
  <Accordion title="Publishing failed — what now?">The review step shows the error and a way to retry. The most common cause is a project that needs a live server (API routes or server-side rendering), which can't be served as a static site. Adjust the project to be frontend-only, then publish again.</Accordion>
  <Accordion title="My published site is out of date">Editing the project doesn't update the live site on its own. Open the Publish panel and select **Update site** to rebuild and push your latest changes.</Accordion>
  <Accordion title="My old link stopped working">If you renamed the subdomain, the old address no longer resolves. Share the new `your-name.r21.dev` URL instead.</Accordion>
  <Accordion title="I published something private by accident">Open the Publish panel and select **Unpublish**. The site becomes unreachable. Remove the private content, then publish again when ready.</Accordion>
</AccordionGroup>

## FAQ

<AccordionGroup>
  <Accordion title="Does publishing cost credits?">No. Publishing and updating a published site are free. Only building and editing the project itself spend credits.</Accordion>
  <Accordion title="Can other people see my site without an account?">Yes — a published site is public. Anyone with the link can open it, no Mythos account required.</Accordion>
  <Accordion title="Can I change my URL after publishing?">Yes, anytime. Edit the subdomain on the URL step; the new address goes live within seconds and the old one stops working.</Accordion>
  <Accordion title="How long does publishing take?">Usually under a minute. The panel shows a "Publishing your site" state while it builds, then switches to "Your app is live!".</Accordion>
  <Accordion title="Can I publish both Vite and Next.js projects?">Yes. Both build and deploy as static sites. A Next.js project that depends on a server (API routes, SSR, server actions) won't publish — those need a live backend Mythos doesn't host.</Accordion>
</AccordionGroup>

## Related

* [SEO & social previews](/publishing/seo) — the title, description, and image you set on the SEO step.
* [Custom domains](/publishing/custom-domains) — using your own domain instead of `*.r21.dev`.
* [Credits & pricing](/introduction/credits-and-usage) — what building and editing cost (publishing is free).
* [Quick start](/introduction/getting-started) — building the project you'll publish.
