# METHODOLOGY MIGRATION Source: https://docs.abtestly.com/METHODOLOGY-MIGRATION # Methodology migration: marketing /guides to docs /methodology Status: **plan only. Nothing in this document has been applied.** The six docs pages and the `docs.json` navigation group are written. No marketing file has been touched and no redirect has been configured. ## Why The docs subdomain ranks around position 4 to 5 for the queries these guides target. The equivalent marketing guides sit near position 85. The working hypothesis is that Google reads `docs.abtestly.com` as an informational surface and `abtestly.com/guides/` as a commercial one, so the same subject matter is being scored very differently depending on where it lives. Moving the material and 301ing the old URLs tests that hypothesis directly. ## 1. Redirect map (301, permanent) | Old marketing URL | New docs URL | | ------------------------------------------------------- | ----------------------------------------------------------------- | | `https://abtestly.com/guides/` | `https://docs.abtestly.com/methodology/overview` | | `https://abtestly.com/guides` | `https://docs.abtestly.com/methodology/overview` | | `https://abtestly.com/guides/peeking-problem` | `https://docs.abtestly.com/methodology/peeking` | | `https://abtestly.com/guides/minimum-detectable-effect` | `https://docs.abtestly.com/methodology/minimum-detectable-effect` | | `https://abtestly.com/guides/how-long-to-run-ab-test` | `https://docs.abtestly.com/methodology/test-duration` | Two of the six new pages have no old counterpart and need no redirect: * `https://docs.abtestly.com/methodology/sample-ratio-mismatch` (new; a methodology sibling to the existing `/results/srm`, which stays where it is and keeps its own inbound links and its in-product deep link from the results banner) * `https://docs.abtestly.com/methodology/confidence-intervals` (new) ### Landing page URL: resolved The landing page is `methodology/overview.mdx`, served at `https://docs.abtestly.com/methodology/overview`. It was originally written as `methodology/index.mdx`. That was changed deliberately, for two reasons. Every other section in this repo already uses `overview.mdx` (`targeting/overview`, `goals/overview`, `signals/overview`, `exclusion-groups/overview`), so `index` would have been the only exception. More importantly, a self-referential 308 loop from an `/index` redirect has taken this docs site down once before, and `overview` removes the ambiguity rather than leaving it to be discovered in production. Do **not** add `{ "source": "/methodology", "destination": "/methodology/overview" }` to the `redirects` array in `docs.json`. It is not needed, Mintlify renders the group from the nav, and that shape of self-referential redirect is exactly what caused the earlier outage. After the docs deploy, confirm the target answers before pointing live traffic at it: ``` curl -sI https://docs.abtestly.com/methodology/overview | head -1 ``` If that returns 200, the redirect table below is correct as written. ## 2. Marketing-side changes required **None of these have been made. File paths are relative to the marketing package root. Line numbers are as of this audit.** ### 2.1 Sitemap: `public/sitemap.xml` Remove four `` blocks, lines **141 to 164** inclusive (24 lines). The file currently holds 33 `` entries and would hold 29. | Lines | `` | | ---------- | ------------------------------------------------------- | | 141 to 146 | `https://abtestly.com/guides/` | | 147 to 152 | `https://abtestly.com/guides/peeking-problem` | | 153 to 158 | `https://abtestly.com/guides/minimum-detectable-effect` | | 159 to 164 | `https://abtestly.com/guides/how-long-to-run-ab-test` | Removing a URL from the sitemap does not retire it from the index. The 301 is what does that. Keep the entries in place until the redirects are live, then remove them, so Google is not asked to recrawl a page that still resolves 200 with no forwarding. ### 2.2 Build inputs: `vite.config.js` Remove four `rollupOptions.input` entries, lines **39 to 42**: ``` 39 guidesIndex: resolve(__dirname, 'guides/index.html'), 40 guidePeeking: resolve(__dirname, 'guides/peeking-problem.html'), 41 guideMde: resolve(__dirname, 'guides/minimum-detectable-effect.html'), 42 guideDuration: resolve(__dirname, 'guides/how-long-to-run-ab-test.html'), ``` A page absent from that object is never copied to `dist/`, so removing these four lines is sufficient to stop shipping the guides. Deleting the four source files under `guides/` is optional and carries a test consequence, see 2.5. ### 2.3 AI crawler manifest: `public/llms.txt` Lines **29 to 35** are a `## Guides` section listing all four URLs: ``` 29 ## Guides 30 31 - [Guides](https://abtestly.com/guides/) 32 - [The Peeking Problem](https://abtestly.com/guides/peeking-problem) 33 - [Minimum Detectable Effect](https://abtestly.com/guides/minimum-detectable-effect) 34 - [How Long to Run an A/B Test](https://abtestly.com/guides/how-long-to-run-ab-test) 35 ``` This file is copied to the dist root verbatim and is what AI engines read to describe the product. Repoint the four URLs at the docs equivalents rather than deleting the section, and consider adding the two new pages (`/methodology/sample-ratio-mismatch` and `/methodology/confidence-intervals`) while you are in there. ### 2.4 Internal links pointing at `/guides/` Two classes. The first is substantive body copy and needs repointing at the new docs URLs. The second is a repeated footer link. **Body copy, repoint individually:** | File | Line | Link target | | ---------------------------------------- | ---- | --------------------------------------------------------------------------------------------------------------------------- | | `ab-test-calculator.html` | 440 | `/guides/minimum-detectable-effect` | | `ab-test-calculator.html` | 441 | `/guides/how-long-to-run-ab-test` | | `ab-test-calculator.html` | 442 | `/guides/peeking-problem` | | `optimizely-sample-size-calculator.html` | 172 | `/guides/minimum-detectable-effect` | | `optimizely-sample-size-calculator.html` | 183 | `/guides/peeking-problem`, `/guides/how-long-to-run-ab-test` (two links on one line) | | `optimizely-sample-size-calculator.html` | 220 | `/guides/minimum-detectable-effect`, `/guides/peeking-problem`, `/guides/how-long-to-run-ab-test` (three links on one line) | | `revenue-ab-testing.html` | 239 | `/guides/peeking-problem` | | `switch-one-experiment.html` | 142 | `/guides/` | **Footer "Guides" link, one per page, all `Guides`:** | File | Line | | ----------------------------------------- | --------------------------- | | `404.html` | 158 | | `ab-test-calculator.html` | 492 | | `abtasty-alternative.html` | 250 | | `abtasty-pricing.html` | 295 | | `abtasty-vs-abtestly.html` | 287 | | `abtestly-vs-optimizely-vwo-convert.html` | 379 | | `browser-ab-testing-runtime.html` | 236 | | `code-first-ab-testing.html` | 225 | | `convert-alternative.html` | 218 | | `convert-pricing.html` | 268 | | `convert-vs-abtestly.html` | 279 | | `index.html` | 1526 | | `migrate-from-convert.html` | 206 | | `migrate-from-optimizely.html` | 311 | | `migrate-from-vwo.html` | 322 | | `optimizely-alternative.html` | 214 | | `optimizely-pricing.html` | 301 | | `optimizely-sample-size-calculator.html` | 263 | | `optimizely-vs-abtestly.html` | 256 | | `posthog-vs-abtestly.html` | 473 | | `pricing.html` | 1040 | | `privacy.html` | 373 | | `refund.html` | 258 | | `revenue-ab-testing.html` | 239 (body) and 330 (footer) | | `signals.html` | 863 | | `switch-one-experiment.html` | 351 | | `terms.html` | 395 | | `vwo-alternative.html` | 216 | | `vwo-pricing.html` | 298 | | `vwo-vs-abtestly.html` | 258 | | `vwo-vs-optimizely.html` | 307 | There is no shared footer partial. Every page carries its own copy, so this is 31 separate edits. The footer already links "Docs", so one valid option is to drop the "Guides" list item entirely rather than repoint 31 links at `docs.abtestly.com/methodology`. That is a design decision, not a technical one. ### 2.5 Test consequence if you delete the `guides/` directory `test/competitive-claims.test.mjs` line 101 builds its scan list with an **unguarded** `readdirSync(join(root, 'guides'))`. Deleting the directory makes `npm test` throw at module load rather than fail a claim, so if you remove the source files you must also update that readdir (the sibling `scripts/inject-chat-widget.mjs` already wraps its equivalent call in a try/catch and needs no change). The safer sequence is to remove the four `vite.config.js` inputs first, leaving the source files on disk. The pages stop shipping, the claims guard keeps scanning them, and nothing breaks. Delete the directory later as a separate change with the test fix attached. ## 3. How to serve the redirects The marketing site has **no `_redirects` file**, and none anywhere in the repository. That is deliberate and worth preserving. ### Option A: Cloudflare Bulk Redirects at the zone level (recommended) Configure five source-to-target rules in the Cloudflare dashboard under Rules, Redirect Rules, Bulk Redirects, on the `abtestly.com` zone. Set status 301, preserve query string off, subpath matching off. Advantages: * It runs at the zone edge, before the Pages project is consulted, so it cannot interact with how Pages resolves extensionless URLs. * It survives a Pages redeploy, and it survives the marketing build losing the `guides/` inputs. Order of operations stops mattering. * It is editable without a deploy, so a wrong target is a one-minute fix rather than a build and a propagation wait. * Cross-hostname redirects to `docs.abtestly.com` are exactly what the feature is for. Disadvantages: * The rule lives in the Cloudflare dashboard and not in version control, so it is invisible to anyone reading the repository. Record the five rules in this file when you create them, and keep this file updated. * Bulk Redirects consume a redirect-list quota on the account. ### Option B: a `_redirects` file in the marketing project Cloudflare Pages reads `_redirects` from the build output root. Adding one would put the rules in version control alongside the pages they replace, which is the honest advantage. The risk is specific and this project has already been bitten by the neighbouring version of it. Pages serves this site's extensionless URLs (`/pricing` for `pricing.html`) through its own clean-URL handling, and `_redirects` is evaluated in the same layer. A rule set that introduces a `/guides/` source alongside that resolution has a real chance of either shadowing the clean-URL behaviour for the whole directory or creating a loop between `/guides` and `/guides/`. Introducing the file at all changes the request path for every URL on the site, not just the five being redirected, which is a wide blast radius for a small change. If Option B is chosen anyway, deploy it to a Pages **preview** branch first and verify with `curl -sI` that a representative sample of existing clean URLs still return 200 and that all five redirect sources return 301 with the right `Location`. Do not verify this from a browser: Cloudflare's HTTP surface in front of this project is not a reliable read for cache and redirect behaviour, and a preview deployment tells you more than the production URL will. ### Recommendation Take Option A. The rules are cross-hostname, they need to outlive the marketing build losing its guide inputs, and the clean-URL interaction in Option B is a risk taken for a bookkeeping benefit. ## 4. Suggested order of operations 1. Ship the docs pages and the `docs.json` navigation group. Verify the `/methodology` URL shape with the curl in section 1. 2. Confirm the six pages appear in the Mintlify-generated sitemap at `https://docs.abtestly.com/sitemap.xml`, then submit that sitemap in Search Console. Mintlify generates it; there is no sitemap file in the docs repository to edit and none should be added. 3. Configure the five Bulk Redirect rules. Verify each with `curl -sI`. 4. Repoint the marketing body-copy links (section 2.4, first table) and `public/llms.txt` (section 2.3). These now point at live docs pages through a live redirect either way, so the order between 3 and 4 is not critical. 5. Remove the four `vite.config.js` inputs and the four sitemap blocks. Deploy the marketing site. 6. Leave the `guides/` source files on disk. Handle the directory deletion and the `competitive-claims.test.mjs` readdir together, as a separate change. 7. Watch Search Console for the four old URLs moving to "Page with redirect" and the five new docs URLs entering the index. Expect weeks, not days. ## 5. What this document does not cover * The `docs.json` `redirects` array was not touched. No docs-internal redirect is required by this migration. * `/results/srm` keeps its URL and its inbound link from the in-product SRM banner. The new `/methodology/sample-ratio-mismatch` page is a method reference beside it, not a replacement. * The marketing structured data on the guide pages (`TechArticle`, `FAQPage`, `BreadcrumbList`, and the `CollectionPage` on `guides/index.html`) goes away with the pages. Mintlify emits its own page metadata and the docs pages do not carry hand-written JSON-LD. Whether to reconstruct FAQ structured data on the docs side is an open question and out of scope here. # Recycle bin Source: https://docs.abtestly.com/assets/recycle-bin Soft delete leaves the file serving. Permanent delete is the one that actually frees storage. Two-step, on purpose. Deleting an asset is a two-step process. ## Step 1: soft delete **Delete** on an asset row moves it to the recycle bin. * The asset **still serves at its URL.** Nothing hosted or embedded breaks. * It shows up in the **Recycle bin** view (toggle at the top of the Assets tab). * It **still counts against your storage budget.** The two-step exists because "an asset is not attached to a variant" is not the same as "the asset is not in use". Emails you sent last month, third-party embeds, cached copies in a stakeholder's browser all of those might still hit the URL. Soft-deleting without breaking the URL gives you a moment to notice. ## Step 2: permanent delete **Permanent delete** in the recycle bin actually removes the file. * The R2 object is deleted. * The Cloudflare cache is purged (within minutes). * **The URL will 404 from now on.** Anything referencing it stops working. * **Storage is freed**, your budget usage drops. This step is confirmation-gated. There is no undo. ## Restore From the recycle bin, **Restore** brings a soft-deleted asset back to active, no permission changes, no URL changes, just moves out of the bin. ## Storage stays used until permanent delete The Assets tab meter includes soft-deleted files. This is the opposite of what you might expect, most trash bins in most products "free up space" on soft delete. Ours does not, because the URL still serves and R2 still stores the bytes. If you are running close to your plan's storage budget, soft delete does not help. Permanent delete does. ## Dependents check Before deleting, click the asset to see **which variants reference this file**. Substring match on the URL across every variant's JS and CSS on the site. Zero dependents is safe to delete. Non-zero dependents means at least one variant will break if you delete the file, decide whether to update the variant first. ## Assets that were used a long time ago The dependents check reads *current* variants. It does not know about: * **Archived experiments**, the variants are still in the archive; the URL might still be embedded in the archived variant's JS/CSS. * **Cloned experiments**, if the clone kept a hard-coded URL to the original's asset, the dependents check catches it via string match, which is why we do string match rather than a metadata-only lookup. * **External embeds**, an email you sent, a third-party site that hotlinks the URL. Nothing on our side can see those. For assets that have been around a while, prefer soft delete over permanent delete. A week in the recycle bin gives you time to notice external breakage. # How assets are served Source: https://docs.abtestly.com/assets/serving usercontent.abtestly.com. Immutable, canonical URL, one-year immutable cache header, CORS wildcard, DMCA takedown path. Assets you upload live on `usercontent.abtestly.com`. Deliberately a separate hostname from `app.abtestly.com` and `cdn.abtestly.com`. customer content is isolated from the app and the snippet. ## The URL shape ``` https://usercontent.abtestly.com/a/// ``` * ``, a per-site 32-character hex string. Namespaces are isolated from each other; site A cannot enumerate site B's files. * ``, the SHA-256 of the file contents. Content-addressed. any change to bytes produces a new URL. * ``, the canonical filename. A request with a different filename returns a `308 Permanent Redirect` to the canonical one. ## Cache Every response includes: ``` Cache-Control: public, max-age=31536000, immutable ``` That is one year, marked immutable. Browsers cache aggressively; CDNs and edges cache aggressively. Safe, because the content is content-addressed, a change means a new URL. The old URL never serves different bytes. ## CORS `Access-Control-Allow-Origin: *`. Assets are safe to reference from any domain. ``, `