Bringing an existing site onto the page system
Most sites are not new. This is the order to move a live site onto the patterns without losing what it already ranks for, one template at a time, each proven before the next.
The order
- Baseline.
clickd_site({ site }),clickd_brief({ site })andclickd_pages({ site }), kept as they came back. With no key, the site's report athttps://clickd.com/report/<domain>. Save the list of live addresses too: the sitemap, andclickd_map({ site }), which is listed athttps://clickd.com/mcp/all(connect that address in place of /mcp to see it; every tool name answers at either address). - Group pages by template. For each template, the addresses it makes and the kind clickd files them under (
clickd_pages({ site, kind: "service" })). A template whose pages are filed under the wrong kind is checked against too few rules: fix the kind first (step 1 of the skill). - Rank the templates. Work first on the template with the most pages failing the heaviest rules.
clickd_pages({ site, failing: "<rule>" })for each failing rule in the brief shows which template the failures share. - The frame first. The shared layout touches every page at once and changes no address: title, description, canonical, landmarks, share tags, one
h1out of the header. Ship it alone and check it. - One template at a time. The outline, the structured data and the links for one kind of page; ship, rescan, compare; then the next.
- Addresses last, and only if they must change. See below.
Each step is small enough to undo by reverting one change. Never mix a frame change and an address change in one release: if traffic moves, you will not know which did it.
What not to change while migrating
- An address that already ranks, unless it is wrong in a way that costs more than the move.
- The copy's meaning, prices, policies or offers. Move a paragraph under its question; do not rewrite what it says without the person.
noindexon a page that has it, until the person says the page should be found.- Anything a second system owns: a plugin's markup, a CMS field, a theme's settings. Find where it is made and change it there, or turn the plugin's part off; never patch its output after the fact.
When an address has to move
Google's guide to moving a site lays out the same steps for a few pages as for a whole domain.
- Map every old address to its one new address, from the sitemap, the server logs and analytics. Images and files count.
- Redirect each old address to its new one with a permanent, server-side redirect (301 or 308) in one hop. Never send a set of pages to the home page.
- Change the links in the site's own pages, menus and sitemap to the new addresses, so nothing leans on the redirect (
direct-links). - Each new page has a canonical to itself, and the sitemap lists the new addresses only.
- Keep the redirects for as long as possible, generally at least a year.
Check every mapped address with https://clickd.com/redirect-checker?url=<old address>: one hop, permanent, landing on a page that answers 200.
Where the parts live, by platform
Only what is genuinely different on each. Everywhere else the patterns are plain HTML.
Next.js (App Router)
- Title, description, canonical (
alternates.canonical) and share tags (openGraph,twitter) fromexport const metadataorgenerateMetadatainlayoutorpage, so each page's values come from its own data. Both work only in server components. - JSON-LD as a
<script type="application/ld+json">in the page's server component, built from the page's data, withJSON.stringify(data).replace(/</g, '\\u003c')so no value can close the tag. Next.js's own guide gives exactly this. - A server component sends its text in the HTML. A client component that fetches its text after load does not: keep the page's words out of
useEffect. app/sitemap.tsandapp/robots.tsmake both files from the same data as the pages.
Shopify (Liquid themes)
- The frame is
layout/theme.liquid, the layout every template is drawn through:content_for_layoutis where each page's own content goes, inside<main>. - JSON-LD values through the
jsonfilter,{{ product.title | json }}, which quotes and escapes them. Shopify's documentation says it escapes quotes; it says nothing of</script>, so do not pass raw HTML fields such as a description with tags into it. - Product data is the job of the
clickdskill's shop-ready guide (references/shop-ready.md).
WordPress
- Before writing any JSON-LD or meta tags, view the page's source and see whether a plugin already writes them. Two plugins, or a plugin and the theme, each writing an
Organizationgive two answers: keep one and turn the other off in its settings. - Escape JSON-LD with
wp_json_encode.
A single page app
- Every page needs its own address the server can answer with that page's HTML: server rendering or prerendering, not a shell that a script fills in.
noindexmust not be in the HTML the server sends if the page should be found. Google may skip rendering a page that saysnoindex, so a script that removes it later may never run.- A missing page answers 404 from the server, or the script sends it to an address that does.
Proving each release
After each release goes live:
clickd_rescan({ site, reason: "frame: canonical, landmarks, one h1" })
clickd_changes({ site, job }) every minute or two until it says done, then rules now passing, rules newly failing, pages added and removed
clickd_pages({ site, failing: "<rule>" }) any page of the template still failing- A rule newly failing is the first thing to read. A frame change that adds a second
h1site-wide, or a canonical with the wrong host, shows here on every page at once. - Pages removed that should not be: an address that now redirects or answers 404. Check it before the next release.
- A site is read at most once every ten minutes.
Sources
- How to move a site: mapping old addresses, permanent server-side redirects in one hop, updating links and sitemaps, and keeping redirects a year or more.
- Redirects and Google Search: which redirects Google reads as permanent and which as temporary, and why server-side is best.
- How to implement JSON-LD in your Next.js application: Next.js's own guide to JSON-LD in a server component, with the
<escape. - generateMetadata: the metadata object and function, the canonical and share fields, and that they run only in server components.
- sitemap.xml:
app/sitemap.ts, a sitemap made by a function from the site's data. - robots.txt:
app/robots.ts, with the line that names the sitemap. - Layouts:
theme.liquidas the layout every template is drawn through. - Liquid filters: json: what Shopify's
jsonfilter escapes, and what it does not say it escapes.