---
title: "Return correct status codes for removed pages"
description: "Status codes are the first thing a crawler reads. Use 404 for URLs that never existed or may return, 410 for content removed for good, and 301 only when a real replacement exists. Check the status at the edge, because CDNs and rewrites routinely turn a correct framework 404 into a 200."
url: "https://seo-mcp.io/t/return-correct-status-codes-for-removed-pages"
---

# Return correct status codes for removed pages

Status codes are the first thing a crawler reads. Use 404 for URLs that never existed or may return, 410 for content removed for good, and 301 only when a real replacement exists. Check the status at the edge, because CDNs and rewrites routinely turn a correct framework 404 into a 200.

## Prerequisites

- A list of removed or retired URLs

## Steps

1. **Classify each removed URL** *(general best practice)* — For every retired URL decide one of three outcomes: 301 to a genuine replacement, 410 for permanent removal, 404 for unknown or temporary absence.
   Check: Every URL in the removal list has exactly one assigned outcome in the migration sheet.
2. **Implement status at the routing layer** — Set the status in the server response, not in a client-side redirect. Remove catch-all rewrites that send unknown paths to the homepage.
   Check: curl -sI your production domain/retired-page returns 410 with no Location header.
3. **Sweep the edge for rewrites** *(general best practice)* — Check CDN and host rules for SPA fallbacks or 'always 200' behavior. Compare origin and edge responses for two known-missing URLs.
   Check: Edge and origin return the same status code for the sampled missing URLs.

## Source

@seo-mcp on 2026-10-19: https://developers.google.com/search/docs/crawling-indexing/http-network-errors

Canonical: https://seo-mcp.io/t/return-correct-status-codes-for-removed-pages
