Skip to content

redirect empty pagination pages to stop bot crawl loops#9

Merged
gavyncaldwell merged 1 commit intomainfrom
fix/empty-pagination-redirect
Mar 13, 2026
Merged

redirect empty pagination pages to stop bot crawl loops#9
gavyncaldwell merged 1 commit intomainfrom
fix/empty-pagination-redirect

Conversation

@gavyncaldwell
Copy link
Collaborator

Summary

  • Bots were crawling pagination URLs infinitely (e.g. ?page=161 on tags with ~100 apps), burning KV reads and DB rows on cache misses
  • Empty pages beyond page 1 now 302 redirect back to the base route
  • Applied to all four paginated routes: /tags, /category, /license, /apps

Test plan

  • Visit /tags/feature/no-tracking?page=999 — should redirect to /tags/feature/no-tracking
  • Visit /category/browser?page=999 — should redirect to /category/browser
  • Visit /apps?page=999 — should redirect to /apps
  • Normal pagination still works (page 1 → 2 → back)

Bots were crawling pagination infinitely (e.g. ?page=161 on a tag
with ~100 apps). Empty pages beyond page 1 now 302 redirect back
to the base route, signaling crawlers to stop.
@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Mar 13, 2026

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
unclouded af45c9c Commit Preview URL

Branch Preview URL
Mar 13 2026, 06:22 PM

@gavyncaldwell gavyncaldwell merged commit b028bc7 into main Mar 13, 2026
1 of 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