# Going live

Publish the site on CloudCannon or any static host, and replace everything the template ships as a placeholder.

Source: https://bugstars-docs.pages.dev/going-live/

---

## Host it on CloudCannon

The repository carries CloudCannon's build settings, so there is nothing to fill in by hand.

<Steps items={[{ contentSections: [{ _component: "building-blocks/core-elements/heading", text: "Connect the repository", level: "h3", size: "xs" }, { _component: "building-blocks/core-elements/text", text: "Push your copy to GitHub, GitLab or Bitbucket. In CloudCannon, choose **Create a Site**, pick your Git provider, then your repository and branch. Each CloudCannon site tracks one branch.", size: "md" }] }, { contentSections: [{ _component: "building-blocks/core-elements/heading", text: "Build", level: "h3", size: "xs" }, { _component: "building-blocks/core-elements/text", text: "Set the static site generator to **Astro** and leave the source at the repository root. CloudCannon reads the build settings from `.cloudcannon/initial-site-settings.json` — `npm run build`, output `dist`, Node 24 — and builds.", size: "md" }] }, { contentSections: [{ _component: "building-blocks/core-elements/heading", text: "Attach your domain", level: "h3", size: "xs" }, { _component: "building-blocks/core-elements/text", text: "Add a custom domain in the site's hosting settings. CloudCannon's [documentation](https://cloudcannon.com/documentation/) covers domains, permissions and staging branches.", size: "md" }] }]} orientation="horizontal"/>

Every component's editor configuration is picked up by glob, so the Visual Editor, the Content Editor's insert menu and the data panels work from the first build.

## Host it anywhere else

`npm run build` emits a static `dist/`, search index included. Netlify, Vercel, GitHub Pages or any static host will serve it with the same build command and output directory. Two features are CloudCannon-only and need replacing elsewhere: [form submissions](/feedback-and-forms/) and the redirects in `src/data/redirects.json`.

## Set your production URL

This is the one thing a fresh copy gets wrong without any error. `site` in `astro.config.mjs` is the base for every canonical tag, sitemap entry, RSS link and structured-data URL. Left at `https://example.com`, the pages look right while every one of those URLs points at a domain you don't own.

<CodeBlock language="bash" filename="terminal" showCopy={true}>

```
npm run reset:starter
```

</CodeBlock>

The reset script asks for your site name and URL, then clears the demo content and the template's branding. To set the URL by hand instead, change it in two places: `site` in `astro.config.mjs` and `url` in `src/data/seo.json`. Use your custom domain, not the CloudCannon testing domain, so the URLs stay correct once the domain is attached.

## Replace the placeholders

`npm run check:placeholders` lists everything still set to the template's values. It runs as part of `npm run check`, as a warning.

| File | Replace |
| --- | --- |
| `astro.config.mjs` | `site` |
| `src/data/seo.json` | `url`, `siteName`, `titleFormat`, `description`, favicons, share image |
| `src/data/header.json` | The logo and the topbar links |
| `src/data/footer.json` | Links, social icons and the small print |
| `src/data/pageTools.json` | `repositoryUrl`, which every "Edit this page" link is built from |
| `src/content/changelog/` | The template's releases — the header badge shows the newest |
| `src/data/announcementBar.json` | The launch message |

<Alert variant="tip" title="Make it a hard failure in your own CI" text="Add `npm run check:placeholders -- --strict` to your pipeline and a build with a placeholder URL fails instead of warning."/>

## Before you launch

* Link a CloudCannon Inbox if you keep the helpful vote or any form — without one, submissions have nowhere to go. See [Setting up CloudCannon Forms](/feedback-and-forms/#setting-up-cloudcannon-forms).
* Add a redirect in `src/data/redirects.json` for any page you renamed since people started sharing links.
* Run `npm run check`. It includes `lint:links`, which fails on any internal link that points at no page — a page renamed late in a project leaves them behind.
* Run `npm run build && npm run preview` and try search (⌘K): the dev server has no index, so this is the first time you see it working.
