This post walks through the parts that trip people up: what "static" really means for your project, how Claude Code talks to an outside service, which folder to publish for the common tools, and how to keep the live site matching your code without thinking about it.
Is your site static?
A static site is a set of files a web server sends to the browser as they are: HTML, CSS, JavaScript, images and fonts. Nothing runs on the server when someone visits. Plenty of real sites fit that description, including landing pages, portfolios, docs, event pages and single-page apps that talk to outside APIs from the browser.
Your project is static if, after the build, everything it needs sits in one folder with an index.html at the top. It isn't, or at least not yet, if it depends on any of these:
- API routes or server-side rendering that run on each request
- A database, or environment variables read on the server
- Server languages such as PHP
- Its own login system or payment form
A contact form doesn't rule a site out. Point it at a form service or a mailto link and it works from a static page.
Tip: Not sure? Ask Claude Code. "Does this project need a server to run, or can it be built to static files?" is a question it can answer by reading your config.
How Claude Code reaches a hosting service
Claude Code can use outside tools through MCP servers. Anthropic's guide to connecting Claude Code to MCP servers shows the pattern: one claude mcp add command with the server's URL, then /mcp inside Claude Code to sign in through your browser. Once that's done, Claude can call the service's tools in any session where the server is loaded.
For publishing, that means Claude Code can do the whole job: build the project, package the output, upload it, and tell you when the address works. You stay in one conversation the entire time.
Where the server is available
The same guide describes three scopes for an MCP server:
| Scope | Where it loads | Good for |
|---|---|---|
| Local (the default) | Only the project you added it in | Trying it on one site |
| User | Every project on your computer | Publishing several sites |
| Project | The project, shared through a .mcp.json file in the repo |
Teams who all publish the same site |
If you publish more than one site, user scope saves you from adding it again in every folder.
Setting it up once
With Sitelink, the setup is a single command and a sign-in. Run this in your project's folder:
claude mcp add --transport http sitelink https://mcp.site.link/mcp
Add --scope user to have it in every project on the computer. Then start Claude Code, type /mcp, pick sitelink and choose to authenticate. Your browser opens the Sitelink sign-in, where you enter your email, click Send code, type the 6-digit code, then click Continue and Allow. You sign in once per computer, and the first sign-in creates your account.
To check it worked, ask "What Sitelink names do I have?" If Claude answers from Sitelink, you're ready. The Claude Code setup guide walks through each step.
Which folder to publish
This is the step where most broken deploys start. The folder you edit is usually not the folder you publish. Build tools take your source and write a finished copy somewhere else, and that finished copy is what belongs online.
| Your setup | Build command | Folder to publish |
|---|---|---|
| Plain HTML | None | The folder with index.html |
| Vite | npm run build |
dist |
| Astro | npm run build |
dist |
| Next.js | output: "export" in the config, then npm run build |
out |
You don't have to run the build yourself. Ask Claude Code to "build this site and publish it", and it runs the build command before it uploads.
Next.js needs a static export
A default Next.js app expects a server. Setting output: "export" makes the build write plain files to out. Features that need a server, like API routes and server-side rendering, won't come along, so check the build output for warnings about pages it skipped.
Mind the base path
Your site will live at the top of its address, like https://mycafe.site.link/, not in a subfolder. If you set a base path earlier for another host, set it back to /. Vite's guide to building for production explains how the base option rewrites every asset path, which is exactly why a stale value leaves you with a page that loads without its styles.
Single-page apps and clean URLs
Sitelink serves /about from about.html or about/index.html. A path it can't find gets your 404.html if the site has one, and index.html otherwise, so client-side routing in a single-page app keeps working when someone opens a deep link or refreshes.
Publishing
With setup done, publishing is one sentence in your project folder:
"Build this site and publish it at mycafe.site.link"
Behind that, Sitelink gives Claude a one-time upload link that works for 15 minutes. Claude zips the built folder, uploads it, and the reply tells you whether the site is live. If the name is new, Sitelink claims it first. The publishing guide shows the full terminal session.
The limits are 100 files and 10 MB per site, which covers most static sites with room to spare. When a site goes over, the cause is almost always one of these:
- Photos exported at full camera size. Resize and compress them.
- Source maps (
.mapfiles) left in the build output. - Files in the folder that the site never loads, like design exports or old drafts.
Pages that ask for passwords or card details are refused, because a static page can't keep them safe and that's what phishing pages look like. Link to the sign-in or payment page of a service you already use.
Warning: If the name already points at a ChatGPT Site, Claude asks before it moves the name to your files. Say yes only if you want the address to stop showing the Site.
Keeping the live site in step
After a change, ask Claude to build and publish again. Each upload replaces the whole site, and Sitelink keeps the previous version while the new one rolls out.
The easy thing to forget is the publish itself. You fix a typo, close the terminal, and the live site still has it. Claude Code reads your project's CLAUDE.md file at the start of every session, as Anthropic's page on how Claude remembers your project explains, so one line there makes publishing part of every change:
After changing the site, build it and publish it to mycafe.site.link.
That line also tells a fresh session which name the site uses, so Claude updates your address instead of offering to claim a new one.
Best practice: Keep the line specific. Naming the address avoids any doubt about which site to update, and "build it" makes sure Claude publishes the built folder rather than your source files.
When something goes wrong
| What you see | Likely cause | Fix |
|---|---|---|
| A blank page or missing styles | The source folder was published, or the base path points at a subfolder | Publish the built folder; set the base path to / |
| "Too large" | Over 100 files or 10 MB | Shrink images, drop source maps and unused files |
| The upload link expired | More than 15 minutes passed before the upload | Ask Claude to publish again; it gets a fresh link |
| The publish was refused | A password or card field on a page | Remove the field and link to an outside service |
| Claude says it can't reach Sitelink | The server is waiting for sign-in | Run /mcp and authenticate sitelink |
Frequently asked questions
Do I need a hosting account?
No. Sitelink hosts the files itself, so there's no separate account and no DNS to wait for. The site is live with HTTPS in seconds.
Can I publish a site Claude Code didn't build?
Yes. Any static site works, wherever it came from. Open its folder in Claude Code and ask Claude to publish it.
Can I publish a single HTML file?
Yes. A folder with one index.html is a complete site. If it loads images or stylesheets from your computer, keep them in the same folder so they upload too.
Does this work in Codex too?
Sitelink's MCP server works with Codex as well, added with codex mcp add. This post covers Claude Code.
How do I take the site down?
Ask Claude to unpublish it. The pages stop loading right away, and you keep the name to publish again later. Releasing the name gives it up too, and nobody else can claim it for 14 days.
What does it cost?
Every name is free for its first 30 days, with no card. After that most names are $9 a year, and common words and 3-letter names cost more. The pricing page shows every price.
What if my site is a Claude artifact, not a folder?
Then you don't need Claude Code. See how to host a Claude artifact online, which publishes straight from the chat.
The short version
Check that your build ends in one folder with an index.html, add the MCP server once, and sign in from /mcp. Publish the built folder, not the source, with the base path set to /. Then add one line to CLAUDE.md so every change you make in Claude Code ends with the live site updated.

