<!-- Built by scripts/build-agent-docs.mjs from site/agents-src/move-away.md: edit that file. -->
# Moving a site away from Page Lemon: guide for AI assistants

> For people: https://pagelemon.com/docs/move-away explains this feature in plain words. This page is for AI assistants.

The person can take a site to another host whenever they like, at no charge and without asking Page Lemon. The site is plain files (HTML, CSS, images, scripts) that any static host can serve. Your part: give them the files, say what stops working on a copy hosted elsewhere, export what Page Lemon kept for them, and move the domain last. Leaving Page Lemon altogether: https://pagelemon.com/agents/leaving. Publishing in general: https://pagelemon.com/agents.

Use this when the person says "Give me a download of my site", "I want to host my site somewhere else", "What do I lose if I leave Page Lemon?", "Move my domain away", or asks for a copy to keep.

## Plans and limits

Downloading, exporting and moving away are free on every plan and are never refused because of the plan. How far back versions go depends on the plan (https://pagelemon.com/pricing); `get_site_versions` shows what is kept.

- A site download is at most 10 an hour per person, and each link at most 5 fetches an hour (`429` with `retry_after`: wait, don't loop). Links from `get_site` work for 1 hour; a site over 1 GB comes in parts of up to 1 GB each, and together they hold every file.
- The "this site has moved" notice on the free `pagelemon.dev` address is free for everyone. It needs a kept (claimed) site; on a site published without an account, offer to keep it first.
- Say plan names, never ids.

## Ask the person

In one message:

1. **Which site**, and which version if not the live one (an older version can be downloaded in the app).
2. **Where it is going** if they know (a static host, their developer, another builder). Page Lemon doesn't recommend a company and earns nothing from where they go.
3. **Does the site use a custom domain, forms, bookings, passcodes or invite-only pages?** You can read this yourself (below); confirm what they want to do about each.
4. **Whether the site stays on Page Lemon** afterwards as a backup on its free address, or is deleted when they're happy.

## What the person needs ready

- **A place to put the files.** A static host account, or their developer. Any static host takes a folder with `index.html` at the top; Page Lemon's zips are laid out that way.
- **To move the domain:** the login of the company where the domain's DNS is kept (the domain's bill or reminder emails name it; a "whois" lookup page shows the registrar). The new host shows the DNS records to use, usually in its domain settings. If a web designer runs the DNS, they pass the records to the designer.
- **For form replies and bookings:** nothing to find; export them first (below).

## Set it up

1. **Get the files.** MCP: `get_site` with `site` and `download: true` returns one-hour zip links (in parts of up to 1 GB) and an `agent_message` that lists what runs on Page Lemon. The person can also open the site in the app (**Settings** → **Versions** → **Download .zip**, or **Download** beside an older version; the reply's `download_url`), where links last a day. Give the links to the person; don't fetch or store the zip yourself.
2. **Say what stops working on a copy.** The reply's `hosted` object (REST) or `agent_message` (MCP) names it: `plugins` (forms and booking pages), `password`, `protected_paths`, `invited_visitors` and `domains`. A site that uses none of them works the same elsewhere. Otherwise tell the person:
   - **Contact forms and bookings** run on Page Lemon and stop on a copy. Export the data first: the site's **Lists** → the form or **Bookings** → **More** → **Export CSV** (the full download in the app also gives bookings as `.ics` for any calendar app), or `get_lists` with the form's or the bookings `list` and `export: "csv"` for a link. The site's own lists are already filled into the zip's pages; export them too (**Lists** → the list → **Export CSV**) if the new site should keep editing them. Then: a form service that gives a form address to post to (change the form's `action`), the new host's own form feature, or a `mailto:` link; for bookings another booking tool with the same services and hours, and tell customers with upcoming bookings where to manage them now.
   - **Passcodes and invite-only pages** stop: the new host needs its own way to keep pages private, or those pages stay here.
   - **Visit numbers** stay here and don't move.
   - **Payments:** finish or refund open orders first (if the account has any).
3. **Move the domain last.** (a) The person publishes at the new host and checks the site there. (b) At their domain company they point the domain at the new host with the records it gives them. (c) When the domain shows the new site, `remove_domain` here (first call returns `confirm_token`, show it, repeat after their yes); or **Settings** → **Domain** in the app. Disconnecting first leaves the domain showing nothing until the new host answers. The domain stays with their registrar either way; its old DNS records can be removed there.
4. **Old links.** When the new site works, the free `pagelemon.dev` address can send visitors on for 90 days: in the app, **Settings** → **General** → **This site has moved**, with a choice of going straight to the new address or showing a page with a link. The new address must be `https://` and a public host name. A custom domain moves with its DNS, so this is for the `pagelemon.dev` address only.
5. **Deleting the site** here when they no longer need it is a separate step: `delete_site` returns an `approve_url` for the person; the site stays as it is until they confirm there. They can also leave a "moved to" notice at the address for 30 days. Say plainly that deleting is permanent and download first. Or keep the site here on its free address as a backup.

## Confirm with the person

Before anything that ends service for visitors, show the person what you are about to do and wait for their yes:

- **Disconnecting the domain:** the hostname, and that visitors reach the new site only if its DNS is already pointed there. Check with the person that the new site works on its own address first.
- **The "moved" notice:** the new address and whether visitors are sent straight there or shown a link.
- **Deleting the site:** see step 5. The tool asks the person to confirm on its own page.

Downloading and exporting change nothing and need no confirm.

## Test

1. Have the person open the downloaded folder and check that `index.html` is at the top level, then check the site at the new host before touching DNS.
2. Compare the new site with the live one page by page; test the form or booking replacement with a real message.
3. After the domain moves, open it (the person may need to wait for DNS), then check that it shows the new site before you `remove_domain` here.
4. Tell the person the result of each step before saying the move is done. Their Page Lemon account and plan stay until they cancel (https://pagelemon.com/docs/billing).

## Day to day

- `get_site_versions` and `restore_version` still work while the site is here. `get_site` with `site` shows the state of a domain.
- To keep a copy up to date by hand, download again after changes (10 an hour).
- If they are leaving Page Lemon altogether: https://pagelemon.com/agents/leaving.

## What Page Lemon refuses, and the fix

| Refused or wrong | Fix to offer |
|---|---|
| More than 10 site downloads an hour, or a link fetched more than 5 times an hour (`429`) | Wait for `retry_after`, then try again |
| An expired link (one hour from an AI, a day from the app) | Call `get_site` with `download: true` again, or use the app's **Versions** page |
| `download: true` together with `path`, `version` or `as_of` | Call it alone |
| `remove_domain` without the person's yes, or with an expired `confirm_token` | Show the summary, get the yes, call again (the token lasts 5 minutes) |
| A "moved" address that is not `https://` or not a public host name | Ask for the new site's real `https://` address |
| A "moved" notice on a site that was never kept | Keep the site first (its keep link), then set it |
| Form replies that aren't in the zip | They are not files: export them (CSV) from the site's Lists tab |
| Anything under the person's account in an AI chat (the full account archive) | **Download everything** is in the app only; see the leaving guide |

## Links

- For the person: https://pagelemon.com/docs/move-away
- Leaving Page Lemon: https://pagelemon.com/agents/leaving · Moving a site in: https://pagelemon.com/agents/move-in
- Forms: https://pagelemon.com/agents/forms · Booking: https://pagelemon.com/agents/booking
- API: https://pagelemon.com/docs/api · MCP tools: https://pagelemon.com/docs/mcp
- All AI guides: https://pagelemon.com/agents
