Skip to content

Redirect old Airflow DAG how-to URLs (Search Console 404s) - #81

Merged
ssassi merged 1 commit into
mainfrom
fix/search-console-redirects
Nov 18, 2026
Merged

ssassi merged 1 commit into
mainfrom
fix/search-console-redirects

Conversation

@ssassi

@ssassi ssassi commented Nov 18, 2026

Copy link
Copy Markdown
Contributor

Search Console reported 30 docs URLs as 404s. Most were fixed earlier by Cloudflare redirect rules. The ones still broken are the Airflow DAG how-tos that moved into dags/.

  • Old docs path: /docs/how-tos/airflow/<page> returns 404 for all 15 DAG how-tos.
  • Old .html URLs: for 8 of the 15 pages, Cloudflare's generic rule sends /how-tos/airflow/<page>.html to that broken path. Examples: get-current-branch-name.html, test-dags.html, run-fivetran-sync-jobs.html.
  • /docs/category/snowflake-1: also 404s. Search Console flagged it as a duplicate category.

The fix: a small postBuild step in docusaurus.config.js writes a meta-refresh page for each of these URLs, plus a canonical link to the target. The list of DAG pages comes from the build itself, so a page added to dags/ later is covered automatically. If a stub would overwrite a real page, the build fails.

Why not @docusaurus/plugin-client-redirects: it writes <from>/index.html. On GitHub Pages, that makes /x redirect to /x/, and Cloudflare's trailing-slash rule sends it back to /x. That's a loop; /img and /docs already do it on the live site.

Checked: the build passes, 15 DAG stubs plus snowflake-1.html are generated, and none of them appear in the sitemap.

🤖 Generated with Claude Code

Search Console reported them as 404s. GitHub Pages can't send a 301, so a
postBuild step writes a meta-refresh page at <from>.html for each one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ssassi
ssassi merged commit e5dedaf into main Nov 18, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant