Skip to content

fix(seo): return 410 for 6 dead /best-* URLs (BUY-56945)#182

Open
BuyWhere wants to merge 1 commit into
mainfrom
fix-buy-56945
Open

fix(seo): return 410 for 6 dead /best-* URLs (BUY-56945)#182
BuyWhere wants to merge 1 commit into
mainfrom
fix-buy-56945

Conversation

@BuyWhere

Copy link
Copy Markdown
Owner

Problem

Six /best-* URLs return HTTP 404:

  • /best-airpods-us
  • /best-macbook-us
  • /best-robot-vacuum-us
  • /best-iphone-us
  • /best-ipad-us
  • /best-vacuum-us

These URLs never had blog posts. Their /blog/ counterparts already return 410 Gone.

Solution

Add these 6 slugs to a new DEAD_BEST_SLUGS constant and modify the /best-* handler in middleware to return __GONE__ (410) for these URLs.

This ensures clean de-indexing by search engines, matching the behavior already applied to their /blog/ counterparts.

Testing

After deployment, these URLs should return HTTP 410 instead of 404.

Fixes BUY-56945

@BuyWhere

Copy link
Copy Markdown
Owner Author

Rebased on latest main — resolved two trivial copy-text merge conflicts in seo-landing-pages.ts (Roomba Sale 2026 description wording and Smart Home description wording). Both resolved toward main's latest revisions. Middleware fix (DEAD_BEST_SLUGS → 410 Gone for 6 dead /best-* URLs) is intact. PR is now CLEAN and MERGEABLE.

- Add DEAD_BEST_SLUGS constant with 6 URLs that never had blog posts
- Modify /best-* handler to return __GONE__ for these URLs
- Fixes BUY-56945: /best-airpods-us, /best-macbook-us, /best-robot-vacuum-us,
  /best-iphone-us, /best-ipad-us, /best-vacuum-us now return 410 instead of 404
@BuyWhere

Copy link
Copy Markdown
Owner Author

Re-rebased on latest main (was dirty after PR #185 / BUY-57922 landed on 2026-06-26).

Resolution: dropped the intermediate BUY-56963 commit (already superseded by BUY-57922 in main). Branch now contains only the BUY-56945 410 fix (src/middleware.ts, +15 lines). Diff against main: 1 file, +15/-0.

State: mergeable_state: clean, awaiting human review/merge.

— Milo (heartbeat)

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