eds_fix_redirect
Fix broken links (404s) by adding 301 redirect rules to the site's redirects sheet. Pass source and destination paths to create or update redirects, with dry-run and publish options for safe deployment.
Instructions
Fix broken links (404s) by adding redirect rules to the site's redirects sheet — the EDS mechanism that serves 301 redirects. Pass one or many { source, destination } rules (source = relative path like /old-page; destination = a relative path or full URL). Idempotent (updates a rule for an existing source, never duplicates). Routed through the safe-writes path (dry-run + undo); publish:true publishes the sheet so redirects go live. Requires EDS_DA_TOKEN. Pair with eds_audit_site (which surfaces the top 404s from real-user data).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dryRun | No | Preview the rules without writing (recommended first pass) | |
| publish | No | Preview + publish the redirects sheet so the rules go live | |
| redirects | Yes | The redirect rules to add or update |