← Problem log

Bots still post to removed page

Last verified Oct 17
By the Bluhook team · Updated Nov 8, 2026
Version 1

1What happened

We retired an old chatbot, a quiz and several lead forms on our Next.js site, which is hosted on Vercel. The pages were gone or redirected home. A security check found the code behind them still answering: anyone could still send a lead, a chat or a signup straight to the old addresses, with no page in front. Then a full check found a signup box still showing on two article pages, sending to an address that no longer worked.

2What we did

  1. Switched off every old form address so it returns "not found".

    For buildersIn Next.js, removing a page does not remove its route handler under app/api. Delete the handler or make it return 404.
  2. Kept only what still has a job: the payment webhook, the text-message route a carrier needs, and the unsubscribe link.

  3. Removed the signup box from the shared section that every article page uses.

  4. Changed every button that pointed to a retired page.

  5. Checked every page in the sitemap, not just the pages we touched. Next.js explains how Next.js route handlers answer requests. The OWASP API Security project covers exposed API routes. The Next.js data security guide shows how to secure routes.

3How we know it worked

A test post to each old form address returns 404. All 17 pages in the sitemap show 0 forms, except the search box on our problem log.

4What you can take from it

When you retire a form, retire the code that receives it, then check every page in your sitemap for leftovers.

In our glossary: Red Team Another web exposure is in a Vercel deploy gone public. Another live site slip is in a price that went live.

formsprivacydeploysvercelPublished Oct 17

Your free AI evaluation

14 free questions, a few minutes. Add your email after question 9 to see your top jobs for AI.

Show me my top 3 jobs

Questions people ask

Does deleting a Next.js page remove its API route?

No. Removing a page does not remove its route handler under app/api. Our old form addresses still took leads and signups with no page in front. Delete the handler or make it return 404.

How do I fully retire a form on my website?

Retire the code that receives it, not just the page. Then check every page in your sitemap for leftovers. We found a signup box still showing on two article pages after the form was gone.

Keep reading

Robb Lejuwaan

Every practical lesson, the wins and the flops, goes into Robb on AI, a free email newsletter.

Robb Lejuwaan, writer of Robb on AI
Get Robb on AI, free

Every lesson, win and flop, by email. Opens Substack.

Robb on AI is our free newsletter, written by Robb Lejuwaan.

We'll add you to Robb on AI, our free newsletter on Substack. Unsubscribe anytime. Privacy policy