# Removed a signup page but bots can still post? Switch off the endpoint too

Problem 12. Solved Oct 17. Last checked Oct 17. Tags: forms, privacy, deploys, vercel.
Page: https://bluhook.com/log/nextjs-removed-page-api-route-still-answers

## What 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.

## What we did

1. Switched off every old form address so it returns "not found".
   - In 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.

## How 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.

## What 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.
