"Not found (404)" in Search Console: which addresses to fix on a WordPress site, and which to leave
"Not found (404)" lists addresses that answered 404 when Google asked for them. Most never were pages or were removed on purpose, and Google's help says such 404s do no harm. Only two kinds need work: a page that moved, which needs a redirect, and a page that should exist.
- By
- WP Ministry
- Published
- Tested on
- WordPress 7.1.3, PHP 8.3.35
In short
- A 404 is the correct answer for an address that never was a page, or for a page you removed with nothing in its place. Google's help says 404s do not harm a site's indexing or ranking.
- Sort the list into four kinds. Never a page and removed on purpose need nothing. Moved needs a 301 redirect. Should exist needs the page back.
- The report shows what Google met at its last crawl. Ask each address what it answers today before you change anything.
- WordPress answers some missing addresses with a 301 to a post whose slug begins the same way, so a removed page may not answer 404 at all.
- Do not send every 404 to the home page, block the addresses in robots.txt, or serve a "not found" message with a 200.
- The report lists only addresses that answered 404 in the past month. Google keeps trying a known address for some time, less and less often.
"Not found (404)" in Search Console's Page indexing report is a list of addresses on your domain that answered 404 when Google asked for them. For most of them that is the right answer. An address that never was a page, or a page you removed with nothing in its place, should answer 404, and Google's help for this status says a 404 is not necessarily a problem when a page was removed without a replacement. Two kinds do need work: a page that moved, which needs a redirect from its old address, and a page that should exist and does not.
This page is about the report. If you open a post or page that is published in your dashboard and it answers 404, that is a fault on the site, and how to fix 404 errors on posts and pages that exist has the fixes.
What the status says
Google's help for the Page indexing report opens its entry for this status with one sentence: "This page returned a 404 error when requested." The rest of the entry, and the page around it, say this:
- How Google got the address. It found the address by itself, not from a sitemap or a request of yours: as a link on another page, or because a page used to be there.
- It will ask again. Googlebot will probably keep trying the address for some time, less and less often, and there is no way to tell it to forget an address for good.
- The list is a sample. The table under the status holds examples, at most 1,000 rows, and does not necessarily show every address.
- The list empties by itself. The report shows only addresses that answered 404 in the past month.
The report gives "Website" as the Source of this status. That means your server gave the answer. It does not mean the answer is wrong.
Google's separate help page on 404 errors says that in general they do not affect a site's search performance, and that many are not worth fixing because 404s do not harm indexing or ranking. The Page indexing help gives the rule for the rest: fix only the 404s that you link to yourself or list in a sitemap.
The report shows the last crawl, not the site today. On our own site, the first ten examples under this status had been crawled before the pages at those addresses were published. Asked for again on the day the report was read, four answered with a page and five with a single redirect to the page that replaced them. The tenth was an address under /wp-content/, which the site does not have. So ask an address yourself before you decide anything about it.
Sort the list into four kinds
| Kind | For example | What it needs |
|---|---|---|
| Never was a page | A mistyped link, a link cut short, an address pieced together from a script | Nothing |
| Removed on purpose, with no replacement | An old event, a retired post, a discontinued product | Nothing. A 404 is right, and a 410 says the same |
| Moved or renamed | An edited slug, a new permalink structure, a rebuilt site | A 301 redirect to the new address |
| Should exist | A page deleted or unpublished by mistake | The page back |
Never was a page. Google's help on 404 errors says these come from mistyped links and from Googlebot trying addresses it finds in scripts or other embedded content, and that they have no effect on crawling or ranking. The exception it names is a common misspelling, which can be worth a redirect.
Removed on purpose. Google's documentation on crawl errors says a page you removed, with no replacement of similar content, should answer 404 or 410. For a product that will not return, see out-of-stock and discontinued products.
Moved or renamed. These cost visitors, and they come in numbers after a rebuild. Traffic dropped after a redesign works through them, the redesign SEO checklist is for before a launch, and changing permalinks safely covers a change of the whole structure.
Should exist. Look for the page under Posts or Pages, among the drafts and in the Trash, then restore it and publish it again. If it is published and still answers 404, use the 404 error page.
Start with the addresses that used to bring visitors.
Ask what an address answers today
This asks for one address and prints its status line and the headers that matter here. Put the address from the report in place of the one shown.
curl -s -o /dev/null -D - https://example.com/spring-menu/ | grep -i -E "^(HTTP|expires|cache-control|x-redirect-by|location|x-robots-tag)"A WordPress site with nothing at that address answers like this. A live site may print the first line as HTTP/2 404.
HTTP/1.1 404 Not Found
Expires: Wed, 11 Jan 1984 05:00:00 GMT
Cache-Control: no-cache, must-revalidate, max-age=0, no-store, privateThe first line is the status. The other two are headers WordPress sends with every 404 it answers, and they tell browsers and caches not to keep the answer. There is no X-Robots-Tag line. The page itself, your theme's "Page not found", carries the same robots tag as any other page, max-image-preview:large, with no noindex, and needs none: Google's documentation on status codes says it does not use the content of an address that answers 4xx, and that an indexed address which starts answering 4xx is removed from the index.
| The first line says | And | Read it as |
|---|---|---|
404 | Nothing is there. Right for the first two kinds | |
410 | A rule on the server says the page is gone for good | |
301 | a line X-Redirect-By: WordPress | WordPress, or a plugin running in it, forwarded the address. Check that Location is the right page |
301 | no such line | A rule outside WordPress forwarded it, such as one in .htaccess |
200 | A page is served now, and the report is behind |
To check a whole list, the loop in traffic dropped after a redesign asks every address in a file. The redirect checker follows one address through every hop without a terminal.
WordPress's guess: a missing address that does not answer 404
Before WordPress gives up on an address, it looks for published content whose slug begins with the name in the address, and redirects there with a 301. These are answers from a WordPress site on "Post name" permalinks.
| Asked for | The site has | Answer |
|---|---|---|
/opening-hours/, which never was a page | A post at /opening-hours-over-the-holidays/ | 301 to that post |
| The same address, before that post was published | Nothing like it | 404 |
/spring-menu/, a page now in the Trash | A post at /spring-menu-tasting-night/ | 301 to that post |
/catering-prices/, which never was a page | A page at /catering/ | 404 |
The guess rescues a link that was cut short. It also means a removed page may never answer 404: its address is sent to whatever shares the start of its name, and visitors land on a page about something else. Such an address is not in this list. It is under Page with redirect. And because the answer depends on what is published that day, an address can move between the two lists without anyone touching it.
When more than one slug fits, WordPress takes the first the database returns. Its query asks for no order.
What not to do
Do not redirect every 404 to the home page. Google's help on 404 errors counts a redirect to the home page, in place of a 404, among soft 404s. Its guide to moving a site says not to send many old addresses to one irrelevant destination, which might be treated as a soft 404. The guide's exception is real consolidation: several old pages merged into one can all redirect to it.
Do not block the addresses in robots.txt. The same help page says invalid addresses should return a proper 404 and should not be blocked by robots.txt. A blocked address cannot give Google its 404. See Blocked by robots.txt.
Do not answer 200 with a "not found" message. That is a different status in the same report, "Soft 404". Google's help describes it as a page that shows a "not found" message without sending a 404 code, and its documentation says such pages are excluded from Search. WordPress's own "Page not found" page is sent with a 404, as shown above, and a custom design for it is fine as long as the status stays 404. Anything that shows the home page or a search page at a missing address, with a 200, is what that definition describes.
Do not file removal requests to clear the list. Google's help says a removal request does not take an address out of this report.
If the list is longer than you can sort by hand, WP Ministry's WordPress SEO audit is a one-time, written audit of what stands between a WordPress or WooCommerce site and a search engine.
What causes it
The address never was a page
CommonA mistyped link, a link cut short, or an address a crawler pieced together from a page's code. Nothing was lost, and 404 is the right answer.
Fix: Find where the address comes from, and correct your own links, or Stop WordPress redirecting missing addresses by guesswork, or Let the report catch up, or use Validate fix
The page was removed and nothing replaces it
CommonAn old event, a retired post or a discontinued product. Google's documentation says such an address should answer 404 or 410.
Fix: Answer 410 for an address that is gone for good, or Stop WordPress redirecting missing addresses by guesswork, or Let the report catch up, or use Validate fix
The page moved and its old address was left behind
CommonA slug was edited, the permalink structure changed or the site was rebuilt. WordPress forwards some old addresses by itself and leaves the rest answering 404.
Fix: Redirect an address whose page moved, or Let the report catch up, or use Validate fix
Your own site still links to the missing address
SometimesA link in a post, a menu or a widget still points at an address that is gone, so visitors and crawlers keep arriving at it.
Fix: Find where the address comes from, and correct your own links, or Let the report catch up, or use Validate fix
The page should exist and answers 404
SometimesA page was deleted or set back to draft by mistake, or it is published and WordPress's addresses are not reaching it. This is the one kind that is a fault on the site.
How to fix it
Find where the address comes from, and correct your own links
- Takes care
- No risk
- About 10 minutes
- Steps tested on WordPress 7.1.3
Google's rule is to fix the 404s you link to yourself. This finds them.
Step 1: Read what Google recorded
In the report, select the inspect icon beside an address to open it in the URL Inspection tool, and expand "Page indexing". Under Discovery, the tool's help describes "Referring page" as a page Google possibly used to discover the address. It may link there directly or be two or three links away, and an empty value does not mean that no page links there. "Sitemaps" lists the sitemaps, submitted or named in robots.txt, that point to the address.
Step 2: Search the site's own content for the address
Run this from the site's folder, with the path from the report. How to use WP-CLI covers where to run commands.
bashwp db search "/spring-menu/" --table_column_onceStep 3: Read where each match is
wp_posts:post_contentis the text of a post or page, and the number is its ID.wp_postmeta:meta_valueis where a custom link in a menu is kept.wp_options:option_valueis one of the site's settings, which is also where widgets are kept.wp_posts:guidis an identifier WordPress keeps for a post, not a link, and WordPress's documentation says never to change it.textwp_posts:post_content 14:>See our <a href="https://example.com/spring-menu/">spring menu</a> for details.</p> 15:>See our <a href="https://example.com/spring-menu/">spring menu</a> for details.</p> wp_posts:guid 7:https://example.com/spring-menu/Step 4: Name the post
Put a number from the result in place of
14. If the answer givesrevisionas thepost_type, the match is an old copy that WordPress keeps of a post, and it links nowhere.bashwp post get 14 --fields=post_type,post_status,post_titleStep 5: Correct the link and search again
Edit the post, menu or widget so that the link points at a page that exists, or remove it. Searched again, the address should be left in
guidrows and revisions only.
Two sources cannot be corrected from WordPress. A link on someone else's site is theirs to change. A sitemap left over from an earlier site is removed where it lives: as a file in the site's folder, or as an entry in Search Console's Sitemaps report. WordPress's own sitemap stops listing a page once it is no longer published, and the sitemap checker reads what any sitemap lists.
Redirect an address whose page moved
- Takes care
- Back up first
- About 10 minutes
- Steps tested on WordPress 7.1.3
Google's help for this status says a page that has moved should answer with a 301 redirect to its new location.
Step 1: Ask what the old address answers
Run the command under "Ask what an address answers today". WordPress may already forward it. When the slug of a published post changes, WordPress saves the old slug with the post and answers the old address like this:
If
Locationis the page's new address, there is nothing to add. WordPress does not do this for pages: a page whose slug changed answers 404 at its old address.textHTTP/1.1 301 Moved Permanently Expires: Wed, 11 Jan 1984 05:00:00 GMT Cache-Control: no-cache, must-revalidate, max-age=0, no-store, private X-Redirect-By: WordPress Location: https://example.com/holiday-hours/Step 2: Add a redirect where the answer is 404
On Apache, put one line for each old address at the top of
.htaccess, above# BEGIN WordPress. Download a copy of the file first: a line the server cannot read stops every page.How to set up redirects in WordPress has the other places a redirect can live: a plugin's list, nginx and code. For many addresses at once, the redirect map builder turns a list of old and new addresses into rules.
.htaccessRedirect 301 "/our-team/" "/people/"Step 3: Ask again
The old address should answer 301 with the new address in
Location, and the new address should answer 200.
A saved slug lasts only as long as its post. With the renamed post in the Trash, its old address still answers 301, to an address of the form /?p=123, and that address answers 404. With the post deleted for good, the old address answers 404 itself. A site rebuilt on a fresh install starts with no saved slugs at all.
To undo it: Remove the line from .htaccess.
Answer 410 for an address that is gone for good
- Takes care
- Back up first
- About 5 minutes
- Steps tested on WordPress 7.1.3
A 404 is enough for a removed page, and Google's help says it currently treats a 410 the same as a 404. Use a 410 where WordPress's guess sends a removed address to an unrelated page, or to say that the removal was deliberate.
Step 1: Add a rule above WordPress's block
On Apache, the lines go at the top of
.htaccess, above# BEGIN WordPress. Download a copy of the file first..htaccessRedirectMatch gone "^/spring-menu/?$" RedirectMatch gone "^/events/2019/"Step 2: Ask for the address
Run the command under "Ask what an address answers today". Its first line should now say
410 Gone.
The server answers before WordPress starts, so the visitor sees Apache's own short "Gone" page, not your theme's "Page not found". No other address is touched.
To undo it: Remove the lines from .htaccess.
Stop WordPress redirecting missing addresses by guesswork
- Takes care
- Low risk
- About 10 minutes
- Steps tested on WordPress 7.1.3
Do this on a site where the guess keeps sending removed addresses to the wrong pages: one with many similar slugs, such as a store's products, or one that removes pages often. WordPress has had a filter for each of the two changes below since version 5.5.
Step 1: Open wp-content/mu-plugins
Create the folder if it is not there. WordPress loads every PHP file that sits directly in it, and such a file is switched off only by removing it.
Step 2: To keep exact matches only, create exact-404-guess.php
With this, WordPress redirects only when a slug matches the name in the address exactly.
wp-content/mu-plugins/exact-404-guess.php<?php // Redirect a missing address only to content whose slug is exactly the name asked for. add_filter( 'strict_redirect_guess_404_permalink', '__return_true' );Step 3: Or, to switch the guess off, create no-404-guess.php
Use one file or the other, not both.
wp-content/mu-plugins/no-404-guess.php<?php // Do not guess a redirect for an address that finds nothing. add_filter( 'do_redirect_guess_404_permalink', '__return_false' );Step 4: Ask for a removed address again
It should now answer 404.
What each choice leaves in place, on the same site as the table above:
| Asked for | WordPress as it comes | Exact matches only | Guess off |
|---|---|---|---|
/opening-hours/, a cut-off link to a post | 301 to the post | 404 | 404 |
/spring-menu/, a removed page | 301 to a post with a similar slug | 404 | 404 |
/private-dining/, a page since moved under /catering/ | 301 to its new address | 301 to its new address | 404 |
| The old slug of a renamed post | 301 to the post | 301 to the post | 301 to the post |
Neither file touches a saved slug or the redirect that adds a final slash. With the guess off, a page you move under another parent needs a redirect from you.
To undo it: Delete the file from wp-content/mu-plugins.
Let the report catch up, or use Validate fix
- Easy
- No risk
Nothing has to be pressed. Google's help says it updates the count whenever it crawls an address with a known issue, whether or not validation was requested. An address that keeps answering 404 leaves the list too: the help on 404 errors says they should drop out of the report after about a month.
"Validate fix", on the status's own page in the report, is a request and not a switch. As the help describes it, it is for when every instance of the issue has been fixed. Search Console checks a few of the addresses at once, and stops there if one still has the issue. Otherwise it works through the known addresses under the status, and only those, and ends as failed at the first one where the issue is still present. The help says validation typically takes up to about two weeks and sometimes much longer.
For this status that has a plain consequence. A list that rightly keeps some addresses answering 404 cannot pass, and a failed validation changes nothing about the site. Validate only when every address under the status was one you fixed.
When to get help
Get help when the list holds pages that used to bring visitors, or when it grows after a redesign or a migration. Both mean addresses with a history are answering 404, and each needs matching to the page that replaced it. On a site rebuilt on a fresh install, WordPress kept no record of the old addresses, so the map has to be made from a backup, an old sitemap or Search Console's own exports.
Common questions
Do 404 errors hurt my site's rankings?
Google's help on 404 errors says that in general they do not affect a site's search performance. What can cost visitors is a page that people were finding and that now answers 404 with no redirect to its replacement.
How long do the addresses stay in the report?
The report shows only addresses that answered 404 in the past month, and Google's help says a 404 should drop out after about a month. Google gives no date for when it stops asking for an address, only that it asks less and less often and cannot be told to forget one.
Should I use 410 instead of 404?
Either is right for a page that is gone with no replacement. Google's help says it currently treats the two the same. A 410 has a second use on WordPress: a rule on the server answers before WordPress can redirect the address by guesswork.
- GuideMissing field "hasMerchantReturnPolicy" and "shippingDetails" in WooCommerce: what they mean and three fixes
- GuideNAP consistency: what Google says about name, address and phone, and one place to keep them in WordPress
- GuideQuestions to ask an SEO company before you hire one, and what a good answer sounds like
- GuideReview stars not showing in Google for a local business: Google's rule, and what to do instead
- GuideService area business SEO: Google's rules for the profile, and a website with no address to show
- GuideStaging site indexed by Google: how to remove it and keep the next copy out

