Should deleted documents return 404 or 410, how to choose between the two status codes?

📅 October 9, 2026 👁️ 9

After the content is deleted, should the page return 404 or 410? Choose according to the definition: 404 means the server cannot find the requested resource, and it only indicates that the resource is missing without distinguishing whether it is temporary or permanent; when the resource is permanently removed, the server should change to send 410. So this is not a question of 'which is better', but whether you can confirm that it is permanently removed now. If you can confirm, send 410; if not, or if there is alternative content, go with 404 or 301.

What do the two status codes mean?

The fact expressed by 404 is thin: The address currently has no corresponding resource. It does not promise that it will not have one in the future, so the crawler will still visit at its own pace, and readers and callers cannot judge whether the content has been removed or temporarily failed.

410 expresses a clear judgment: The resource has been permanently removed, and there is no known redirect address. Its semantic strength is higher, as if the site has made a conclusion for the crawler, saving the cost of repeated visits. The cost of making a judgment is in your hands - once issued, the cost of withdrawal is higher than 404.

Status code What does it mean The judgment is borne by the site Applicable time
404 Resource not found Do not judge whether it is permanent Status uncertain, may recover
410 Permanently removed Confirmed permanent and no alternative address Content is determined not to recover
301 Address has been migrated Provide a new official address Has an inherited content
Server error code Service temporarily abnormal Does not represent the content status Program or dependency failure

How to differentiate between permanent removal and temporarily not found

The boundary lies between 'whether it is recoverable' and 'whether there is alternative content.' The deletion action in the content management system is often not a physical deletion, and the recoverability directly determines that the status code should be conservative. AnQiCMS divides the document status into formal documents, drafts, pending publication, and recycling bin. Deleting a formal document is moving it to the recycling bin rather than a physical deletion, and deleted documents can be restored from the recycling bin. Under this process, the address just deleted should maintain 404: the content may be restored at any time, and sending a 410 is making a promise to the outside world that you may overturn at any time.

The truly suitable 410 is another category: channel offline, event page archiving, content determined not to be listed due to compliance requirements, and confirmed not to be migrated. Such decisions are usually accompanied by a batch cleanup, and the status code is processed in batches rather than individually based on a feeling.

Why deletion does not equal immediate 410

In addition to recoverability, there are two reasons why 'immediate 410' is not cost-effective.

The first is the judgment window. Deletion is often initiated by the business, whether to recover, whether to merge into a new page, it takes some time to determine. In this window, 404 is sufficient.

The second is the way of inheriting historical addresses. Many deletions actually accompany content rewriting: old articles are replaced by more complete versions. In this case, the correct action is not to return an error code, but to use 301 to direct the old address to the new address, AnQiCMS supports 301 redirect management to set URL redirection, and transfer the access along with the existing signals.

On the contrary, directly changing a large number of addresses that could have been redirected to 410 is equivalent to actively discarding the inheritance relationship of these addresses, and readers coming from external links will only see a result of '永久没有'.

The order of taking over old addresses

It is recommended to fix the practical operation sequence to avoid making temporary decisions each time.

First, decide the destination of the content: if there is alternative content, go with 301; if the content is no longer available, proceed to the second step.

In the second step, check the recoverability: if it is still in the recycle bin or the address may be restored, keep it as 404. At the same time, do not leave the address on the sitemap list, AnQiCMS will automatically generate the sitemap, and the formal visible address and the deleted address should be distinguishable.

Step 3 discusses 410: confirm permanent removal, no alternative, beyond recovery period, then batch change to 410, and leave the judgment basis for this batch of addresses in the site maintenance records.

Final step: clean up links pointing to these addresses within the site, including navigation, in-line links, and list items, otherwise visitors will still enter the wrong page.

Common questions

Will 410 make links faster to be removed?Semantically, it gives a clear and permanent conclusion, reducing unnecessary visits; but the premise is that your judgment really does not change.

Can the same batch of addresses be 404 first and then changed to 410?Can, this is also a more stable order: first observe the possibility of recovery and substitution, and then unify the change.

What will be returned for drafts and content to be published?They should not appear on public addresses. Internal drafts can be accessed through preview parameters, and when external requests are made to these addresses, no indexable content should be provided.

What should be paid attention to in the error page experience?Provide the in-site search entrance and column links, keeping the readers within the site, which is more effective in reducing attrition than simply displaying status codes.

Related articles

How many links can a site map contain, and how do you split them if you exceed the limit?

The Site Map Protocol specifies the capacity limit: each site map file may not exceed 50,000 addresses, and the uncompressed volume may not exceed 50MB. The index file is also subject to the limit on the number of addresses and volume. When the limit is exceeded, it must be split into multiple files, and the index of the site map is used to list the individual fragments. This article explains the splitting method, the reasons for slicing by column, and the division of labor between in-site generation and promotion channels.

2026-10-09

llms.txt only has one required section, how should the rest be organized

According to the proposal document, the required section of llms.txt is only one paragraph that provides the site or project name's H1 title, the rest are optional structures: block quotes with summaries, file lists grouped by H2, and Optional sections for secondary information. This article explains the purpose of each section, which is for model agents rather than search engine crawling quotas, and can be automatically generated by the system within the site.

2026-10-09

The old exclusion protocol does not have an Allow field, how to express whitelist release?

The original document of the crawling exclusion protocol indeed does not have an Allow field, the protocol only provides exclusion instructions, and does not support wildcard and regular expression matching. The asterisk in the crawler name only represents any crawler. This article explains the source of this restriction, gives three expression methods for whitelist release, and reminds that the matching details are implemented by each crawling party, and need to be checked against the corresponding crawler's document.

2026-10-09

Will the update frequency and priority fields in the site map be executed as commands by the search engine?

The original Sitemap protocol clearly defines the update frequency field as a suggestion rather than a command, and the priority field is only used to make choices between URLs within the same site, and is also unlikely to affect the position of the results page. This article explains the actual scope of these two fields according to the original protocol, and gives two more worthy things to invest in: write the last modified time accurately, and use an active push channel to inform new content and changes.

2026-10-09

Can the crawling exclusion rules be delegated to the CDN layer for distribution, and what do the two configurations manage?

When assigning the crawler exclusion rules to the CDN layer for distribution, the scope of the rules managed by the two layers varies: the configuration within the station manages the paths and priorities of a single site, while the proxy layer can generate and cover multiple sites in batches according to access purposes, but the text rules themselves do not technically prevent crawling, and whether to force a separate switch to confirm is another matter.

2026-10-09

What is the difference between managing multiple stations with one program and installing one program at each station?

How to weigh the two approaches of managing multiple sites with a single program or installing a separate set for each site: consider the extent of sharing, how many upgrades need to be done, whether backups can be restored per site, and the data isolation requirements between sites. Centralized saves redundant labor, while decentralized saves coupling risks.

2026-10-09

How should the boundary be set for the standard functions and modular assembly of the content management system?

How to define the boundary between the standard functions自带的标准功能 carried by the selection and the functions assembled by modules, which capabilities should not be borrowed: content model, permission stratification and publishing chain belong to core capabilities, which need to be supplemented by expansion should also calculate the upgrade interface; Analytical statistics, channel docking and other peripheral capabilities are more suitable for on-demand assembly.

2026-10-09

Can the number of tables and code volume written on the homepage of the official website judge the weight of the program?

The number of data tables and code volume marked on the homepage of the official website can be used to judge the program's resource occupation of the server: these two are structural indicators, indicating complexity and package size, which are not equal to the memory and concurrency performance at runtime. What really needs to be compared is the memory aperture and single-machine carrying capacity of the same technology stack.

2026-10-09