A development host is kept out of search engines without IAPL_NOINDEX (developmentNoindex, default on)

Separate from the mail rule so that it can be taken or left. A site whose address matches
iapl({ developmentHosts }) - built in: *.dev.netscale.pl - is noindex with no env: robots.txt disallows
everything, pages carry noindex, IndexNow sends nothing, buildSecurityHeaders() adds X-Robots-Tag. Nothing
kept a development copy out of search engines until now unless somebody set the variable.

- iapl({ developmentNoindex: false }) switches it off for the project, IAPL_NOINDEX=0 for one environment
- buildSecurityHeaders({ developmentHosts, serverUrl }): next.config runs before the plugin
- the mail rule keeps its own two signals: the development pattern, and the variable itself
- changelog "what changes on upgrade", deployment.md, security.md, AGENT.md, skills

Co-Authored-By: Claude Fable 5.2 <[email protected]>
This commit is contained in:
Radosław Smoliński
2026-11-26 10:31:03 +01:00
co-authored by Claude Fable 5.2
parent 14abf369da
commit bc3aac249f
23 changed files with 215 additions and 24 deletions
+11
View File
@@ -32,6 +32,15 @@ once there are more than 20.
- **Nothing else has to be run.** The e-mail tab of Site integrations has a new block ("How e-mails are sent"); it is
rendered by the status banner already in every import map, so `generate:importmap` gives no diff. No field was
added; "Sending method" keeps its two stored values.
- **What changes for an existing site on upgrade — search engines, on a development host only:** a site whose
address (`NEXT_PUBLIC_SERVER_URL`) matches `iapl({ developmentHosts })` — built in: `*.dev.netscale.pl` — is now
**noindex without `IAPL_NOINDEX`**: robots.txt answers `Disallow: /`, every page carries `noindex, nofollow`,
`buildSecurityHeaders()` adds `X-Robots-Tag: noindex, nofollow`, IndexNow sends nothing. Until now nothing kept a
development copy out of search engines unless somebody set the variable. A site on its real domain is not
affected, and at launch the rule ends by itself with the address. An SEO check (Lighthouse, `iapl-seo-check`) run
against the development address now reports the noindex — run it with `IAPL_NOINDEX=0`, or against the real
domain. To keep the old behaviour: `iapl({ developmentNoindex: false })` (the project), `IAPL_NOINDEX=0` (one
environment), `buildSecurityHeaders({ developmentHosts: false })` (the header).
- **What changes for an existing site on upgrade — e-mail:**
| Site today | After the upgrade | Opt-out |
@@ -111,6 +120,8 @@ once there are more than 20.
project replaces the list with its own patterns or empties it (`[]`). Building blocks: `matchDevelopmentHost`,
`isDevelopmentHost`, `pluginDevelopmentHosts`, `siteIsNonPublic`, `siteNonPublicSignal` (`NonPublicSignal`).
Doctor: `mail-non-public` (info, deep) names the signal that makes a site non-public.
- **Plugin option `developmentNoindex`** (default `true`): a development host is kept out of search engines
without `IAPL_NOINDEX` (above). `buildSecurityHeaders({ developmentHosts, serverUrl })` for the header.
- **Panel:** the state block on the e-mail tab (transport in effect, the site's state with the service, sender and
reply address, what is left of the limits, a replaced sender name; "Check now", "Connect again", "Disconnect";
"Enter an access key" for a token issued by hand only with `mail.relay.accessKeyField: true`); "Sending method" reads "Automatic" / "Microsoft Graph (deprecated)"; the server field reads
+1 -1
View File
@@ -333,7 +333,7 @@ one is better. Google ignores the same description on many pages.
| "Thank you" after a form, a confirmation page | **yes** |
| internal search results, filter/parameter pages | **yes** (+ `disallowParams` in robots) |
| a test page, a draft page, a landing page only for a paid campaign | **yes** |
| staging, preview, a test copy of the whole site | **`IAPL_NOINDEX=1` in that environment's env** — not the checkbox |
| staging, preview, a test copy of the whole site | **`IAPL_NOINDEX=1` in that environment's env** — not the checkbox. A **development host** needs nothing: an address that matches `iapl({ developmentHosts })` (default `['*.dev.netscale.pl']`) is noindex by itself — robots.txt, page meta, IndexNow, and `X-Robots-Tag` from `buildSecurityHeaders()` (pass it `developmentHosts` too if the project changed the list; `next.config` runs before the plugin). Off: `iapl({ developmentNoindex: false })`, or `IAPL_NOINDEX=0` in one environment. Verify: `curl -sI https://<dev host>/ \| grep -i x-robots-tag` and `/robots.txt` says `Disallow: /`; on the real domain neither |
| homepage, archives (blog, projects) | **never** — the panel blocks saving |
| services, offer, contact, about us, posts | **never** |
| privacy policy, cookies, terms | **no** by default (they are a credibility signal, they do no harm); `noindex` only at the client's request |
+1 -1
View File
@@ -266,7 +266,7 @@ The plugin's own variables are `IAPL_<NAME>`; a deploy that sets the spelling fr
| `IAPL_IP_HEADER` | `ipHeader: true` + production | rate limit trusts any IP header (spoofing) + warning in prod | env: `cf-connecting-ip` (Cloudflare) / `x-forwarded-for` (Traefik/nginx) |
| `IAPL_COOKIE_SCAN_URL`, `IAPL_COOKIE_SCAN_TOKEN` | `cookieScanner.crawl` (`iaplEnvRules({ cookieCrawl: true })` requires both in production; token ≥ 16 chars) | **Check site** disabled, the box names the missing variable | env; the token also goes into the scanner service's `IAPL_CRAWLER_SITES` as `host=token` |
| `IAPL_DOCTOR_TOKEN` | no; ≥ 32 characters | `GET /api/ipal/doctor` answers 404; with it the endpoint answers a Bearer token, and `iapl-doctor --url` with the same variable reads the deep counts | env (Coolify) and the doctor's shell; also read by the doctor: `CI`, `NO_COLOR`, `PAYLOAD_CONFIG_PATH` (`--deep`), `IAPL_DOCTOR_IMPORT_MAP` (internal) — doctor.md |
| `IAPL_NOINDEX` | no; `1`/`true`/`yes` **staging/preview only** | — (when set: robots Disallow, meta noindex, `X-Robots-Tag`, IndexNow sends nothing) | staging env |
| `IAPL_NOINDEX` | no; `1`/`true`/`yes` **staging/preview only**; `0` = not noindex although on a development host | — (when set: robots Disallow, meta noindex, `X-Robots-Tag`, IndexNow sends nothing). A host matching `iapl({ developmentHosts })` (default `*.dev.netscale.pl`) is noindex without it (`developmentNoindex: false` to switch off) | staging env |
| `NEXT_PHASE` | set by Next | only tells `next build` from runtime: during the build an unreachable database gives an empty sitemap; at runtime the sitemap throws (route → 503) | do not set by hand |
| `NEXT_RUNTIME` | set by Next | `instrumentation.ts` checks for `nodejs`; missing (scripts, seed) → `buildRevalidateHook` does not revalidate | do not set by hand |
+1 -1
View File
@@ -529,7 +529,7 @@ overrides the default; CSP: `buildCsp` flags (`youtube`, `googleMaps`, `metaPixe
= no policy; after clean reports `mode: 'enforce'` (site and admin); nonces only for pages that already render per request
(`createProxy({ csp })` + `<SiteProviders nonce>`); `withSecurityConfig(config, { hidePoweredBy: false })` keeps `X-Powered-By`;
`buildImagesConfig({ extraHosts })`; env validation is fully opt-in — filter/add rules
(`iaplEnvRules(…).filter(…)`). Staging: `IAPL_NOINDEX=1` (also stops IndexNow). Search engines: `robots` instead of
(`iaplEnvRules(…).filter(…)`). Staging: `IAPL_NOINDEX=1` (also stops IndexNow); a development address under `iapl({ developmentHosts })` (default `*.dev.netscale.pl`) is noindex by itself, nothing to set — check `/robots.txt` there says `Disallow: /` and on the real domain it does not. Search engines: `robots` instead of
`getRobots` ignores the panel; `iapl({ searchSettings: false })` removes the tab; per-bot exceptions in code:
`createContentHelpers({ robots: { aiBotRules: [{ userAgent, access }] } })`. Sitemap: `sitemapOptions: { maxUrls,
cacheControl, memoSeconds }`, `sitemapEntries: (entries) => entries` (add/remove URLs), `underConstructionSeo: false`.
+5
View File
@@ -581,6 +581,11 @@ PROGRAMISTA §6, item 73; email.md; AGENT.md §7.2) — nothing to run; read whi
signal (`mail-non-public`). A copy on another host without the variable sends to the real addresses in its data; keep a copy silent for good
with `mail: { relay: false }` or SMTP to a catcher. Production must not have `IAPL_NOINDEX` set (it would send
nothing).
**A development address is now noindex by itself** (host matches `iapl({ developmentHosts })`, default
`*.dev.netscale.pl`): robots.txt `Disallow: /`, page meta, `X-Robots-Tag`, no IndexNow — with no `IAPL_NOINDEX`.
Nothing to do; tell the owner if an SEO check is run against the development address (use `IAPL_NOINDEX=0`
there, or the real domain). A project with its own list passes it to `buildSecurityHeaders({ developmentHosts })`
in `next.config` too. Old behaviour: `iapl({ developmentNoindex: false })`.
4. Code that compared the result of `payload.sendEmail` needs no change for SMTP and Graph. A send through the mail
service returns `{ sent, transport: 'relay', … }`; `sent: false` with `confirmed: false` means "may have been sent".
5. Your own account mail (invitations): mark it — `withMailKind(message, 'account')`. Form mail and Payload's
+2 -2
View File
@@ -115,7 +115,7 @@ URLs point at that domain. Outside production, `R2_PUBLIC_URL` alone → read-on
| `NEXT_PUBLIC_TURNSTILE_SITE_KEY`, `TURNSTILE_SECRET_KEY` | ⬜ | forms | fallback when the Turnstile keys are not in Site integrations. **`TURNSTILE_SECRET_KEY` is deprecated** — put the secret key into the panel (turnstile.md); the variable keeps working until a later, announced release |
| `INDEXNOW_KEY` | ⬜ | SEO | IndexNow key (takes precedence over the key from the panel) |
| `IAPL_COOKIE_SCAN_URL`, `IAPL_COOKIE_SCAN_TOKEN` | ⬜ (✅ prod with `iaplEnvRules({ cookieCrawl: true })`) | consent | cookie crawl (`cookieScanner.crawl`): the shared scanner service's URL and this site's token ([cookie-scanner.md](./cookie-scanner.md#browser-crawl)) |
| `IAPL_NOINDEX` | ⬜ | SEO | `1`/`true`/`yes` **on staging only** — the whole site is noindex (robots, meta, `X-Robots-Tag`) |
| `IAPL_NOINDEX` | ⬜ | SEO | `1`/`true`/`yes` **on staging only** — the whole site is noindex (robots, meta, `X-Robots-Tag`). Not needed on a development host: a site whose `NEXT_PUBLIC_SERVER_URL` matches `iapl({ developmentHosts })` (built in: `*.dev.netscale.pl`) is noindex by itself; `0` there switches that off for the environment, `iapl({ developmentNoindex: false })` for the project |
| `IAPL_DOCTOR_TOKEN` | ⬜ | ops | ≥ 32 characters turns on the `iapl-doctor` status endpoint `GET /api/ipal/doctor` (404 without it) — [doctor.md](./doctor.md) |
"✅ prod" = required by `iaplEnvRules({ storage: true })` / `({ ipHeader: true })` with
@@ -318,7 +318,7 @@ checkbox; default: both). A changed variable takes effect only after a **redeplo
| `DATABASE_URI`, `PAYLOAD_SECRET` | ✅ only if the build prerenders from the database (§3a3), otherwise ⬜ | ✅ | SSG (`generateStaticParams`) needs the database during `pnpm build`; DB-reading routes stay `force-dynamic` either way (§3b) |
| `R2_*`, `GRAPH_*`, `TURNSTILE_SECRET_KEY`, `INDEXNOW_KEY`, `IAPL_IP_HEADER` | ⬜ | ✅ | read at runtime only — keep secrets out of the build |
| `NODE_ENV` | — | — | do not set by hand: `next build` / `next start` use `production` |
| `IAPL_NOINDEX` | — | ✅ staging only | never on production |
| `IAPL_NOINDEX` | — | ✅ staging only (a development host needs none) | never on production |
Multiline values (keys) → mark *Multiline*; values containing `$` → mark *Literal* (otherwise Coolify interpolates
them). Coolify adds its own variables (`COOLIFY_FQDN`, `COOLIFY_URL`, `SOURCE_COMMIT`, `PORT`, `HOST`) — do not use
+1 -1
View File
@@ -61,7 +61,7 @@ export default withPayload(withSecurityConfig(nextConfig))
| `csp` | `false` | `buildCsp` args → the CSP header (+ `Reporting-Endpoints` with `reportUri`) |
| `additional` | `[]` | extra headers; the same key overrides (also the `csp` ones) |
With `IAPL_NOINDEX=1` (staging), `X-Robots-Tag: noindex, nofollow` is added to every response.
With `IAPL_NOINDEX=1` (staging), or on a development host — the site's address (`serverUrl`, default `NEXT_PUBLIC_SERVER_URL`) matches `developmentHosts` (default `['*.dev.netscale.pl']`, Intecion's development domain) — `X-Robots-Tag: noindex, nofollow` is added to every response. `next.config` runs before the plugin, so a project that changed `iapl({ developmentHosts })` passes the same list: `buildSecurityHeaders({ developmentHosts: [...] })`; `developmentHosts: false` or `IAPL_NOINDEX=0` leaves the header out.
**Uploads:** `buildUploadSecurityHeaders({ collections = ['media'] })` returns `headers()` rules for
`/api/<collection>/file/*` (sandbox, no scripts) — an SVG from local disk cannot run a script on the site's