Plugins Plugin hub Backup SEO Caching Security Forms WooCommerce Images Best backup plugins
Hosting Hosting directory Shared Managed Cloud India
Themes & builders Compare Rank Math vs Yoast
Tools All tools Hosting finder Plugin stack builder Cost calculator Salt generator Theme detector Who is hosting this? Speed test Headline analyzer robots.txt generator Redirect generator Uptime calculator Blog name generator
Best lists Best backup plugins Deals
Guides All guides Speed up WordPress Choose hosting Back up WordPress
How we test

SEO & AI search · Guide

How to Fix 404 Errors for SEO in WordPress

Short answer

To fix 404 errors for SEO in WordPress, find the broken URLs in Google Search Console, then give each one the right outcome: a 301 redirect to the closest matching page if it moved, a real 404 or 410 status if it is gone, or a permalink and link repair if the page still exists. A single 404 does not hurt your whole site, but a pile of broken links wastes crawl time and sends visitors to dead ends.

Key takeaways

  • A 404 means the server cannot find the page, and Google does not index URLs that return a 4xx status code.
  • A soft 404 is worse: the page says it is missing but the server returns a 200 success code, so Google drops it from search.
  • Find 404s in Search Console under Indexing, then Pages, in the Why pages are not indexed table.
  • A page that moved gets a 301 redirect to the closest matching page, never to the homepage by default.
  • A page that is gone for good should return a 404 or 410 status, not a redirect to an unrelated page.
  • After a fix, ask Google to recheck the URL with the URL Inspection tool and allow a few days for the change to show.

What is a 404 error, and does it hurt SEO?

A 404 error means the server cannot find a page at the requested URL, so it answers with a 404 Not Found status code.

One broken link will not sink your site. Google treats each URL on its own, and a clean 404 is the correct answer for a page that no longer exists.

The problem starts when 404s pile up. Google does not index URLs that return a 4xx status code, and URLs that were indexed before and start returning a 4xx code are removed from the index over time, according to Google's HTTP status code guide.

Broken links also waste crawl time. Googlebot spends its visits on dead URLs instead of your live pages, and visitors who hit a dead end leave. Our 404 error causes guide explains where these broken URLs usually come from.

What is a soft 404, and why is it worse than a hard 404?

A soft 404 is a page that tells the visitor the content does not exist while the server still returns a 200 success code.

Google calls this a mismatch between the page and its status code, and such pages are excluded from Search. Search Console flags them as Soft 404 in the Page Indexing report, per Google's crawling error guide.

Common causes listed by Google include a missing server-side include file, a broken database connection, an empty internal search result page, and an unloaded or missing JavaScript file.

A hard 404 is honest and easy for Google to handle. A soft 404 is a page pretending to be alive, so fix soft 404s first when you see them in Search Console.

How do you find 404 errors on your WordPress site?

Open Google Search Console, pick your property, and go to Indexing, then Pages, to see the Why pages are not indexed table.

Click the Not found (404) row to see up to 1,000 example URLs. Click any URL to open it in the URL Inspection tool, which shows the last crawl date and the status Google saw.

Rank Math's 404 Monitor logs every missing URL on your site, with the last access time for each one. Its Advanced mode also records the referrer and the user-agent, so you can see where the broken link sits and whether a bot or a person hit it, as described on Rank Math's 404 Monitor page.

The monitor's log limit defaults to 100 entries, and you can exclude noisy paths and ignore query parameters so tracking links do not flood the list.

How do you fix a 404 for a page that moved?

Send the old URL to its closest matching page with a 301 permanent redirect.

A 301 tells Google and visitors that the page has moved for good, and it passes most of the old page's signals to the new one. Pick the page that covers the same topic, not your homepage.

In Yoast SEO Premium, go to Yoast SEO, then Redirects, choose 301 Moved Permanently, enter the old URL as a relative path, enter the new URL, and click Add redirect. The redirect manager offers 301, 302, 307, 410 and 451 types, as listed in Yoast's redirect help.

In Rank Math, turn on the Redirections module, then hover over a row in the 404 Monitor log and click Redirect. Rank Math fills in the source URL for you.

Google's crawlers follow up to 10 redirect hops by default, but a long chain still slows things down. Point each old URL straight at its final destination instead of chaining redirects together.

Our Yoast redirects guide walks through the redirect manager step by step.

How do you fix a 404 for a page that is gone for good?

Let the URL return a real 404 or 410 status code, and do not redirect it to an unrelated page.

Google's own advice is clear: if you removed the page and no replacement exists, return a 404 or 410 response, as stated in Google's crawling error guide.

Use 410 Gone when the removal is permanent and you want Google to drop the URL faster. Use 404 when the page might come back, or when you are not sure yet.

A redirect to the homepage looks like a fix, but it is not one. Visitors land somewhere they did not ask for, and Google may treat a redirect to unrelated content as a soft 404.

The WP Rocket soft 404 guide makes the same point: a 301 should point to a relevant replacement, not automatically to the homepage.

What the URL should doFixWhat Google sees
Gone, no replacementReturn 404 or 410URL drops from the index over time
Moved to a close match301 redirectNew URL indexed, signals pass over
Still exists, link is wrongFix the linkPage returns 200 again
Thin or empty pageAdd real content, or return 404Page indexed, or treated as not found

Yoast SEO Premium offers a 410 Content Deleted option in its redirect manager, and it asks you to redirect or return a 410 when you trash a post, according to Yoast's redirect guide.

Re-save your permalink settings, because WordPress sometimes loses its rewrite rules after a move, a plugin change, or a server update.

Go to Settings, then Permalinks, in your WordPress dashboard and click Save Changes without changing anything. This rebuilds the rewrite rules and clears many post 404s at once.

If the 404s remain, check that your permalink structure is the one you want, such as Post name, and that no plugin is rewriting URLs. A caching plugin or a security plugin can serve stale rules, so clear the cache after saving.

Our permalinks fix guide covers the full checklist, including the .htaccess file on Apache servers and the case where only some posts return 404s.

Fix the link at its source instead of redirecting every broken URL one by one.

Open the page that contains the broken link, correct the URL, and save. When a post was deleted, either restore it, link to the closest live page, or remove the link.

Missing images cause the same problem in a smaller way. If an image file was deleted from the media library, re-upload it with the same file name, or update the post to use the new file. Check the uploads folder for renamed or moved files first.

After a site move, old links often point at the previous domain or at an http address. Our broken links after migration guide shows how to find and update them in bulk.

How do you set up a 404 page that helps visitors?

Build a custom 404 page that tells visitors plainly that the page cannot be found, then gives them somewhere useful to go.

Google suggests keeping the same look and feel as the rest of your site, adding links to your most popular articles and your home page, and giving visitors a way to report a broken link, as listed in Google's crawling error guide.

Most WordPress themes include a 404 template you can edit in the Site Editor or the Customizer. Add a search box, a short list of your best posts, and a link back to the home page.

A good 404 page only helps people. It does not help search engines, because Google ignores the content of a 404 page. Make sure your server still returns a real 404 status code, or Google may index the page.

How do you confirm the fix worked?

Ask Google to recheck the URL with the URL Inspection tool, then wait a few days for the result to change.

In Search Console, paste the fixed URL into the inspection bar and click Test live URL. If the page now returns a 200, or the correct redirect, the test will show it.

Then click Request indexing for pages you want back in search. Google says most sites should expect three days or more before a changed page is checked and indexed again, per Google's crawling error guide.

Recheck the Pages report after a week. The fixed URLs should leave the Not found (404) list, and the count should fall with each crawl.

What mistakes should you avoid?

The biggest mistake is redirecting every 404 to the homepage, which hides the problem from visitors without fixing it.

  • Do not use a 302 temporary redirect for a permanent move, or Google will keep the old URL in its index.
  • Do not chain redirects, since each hop costs crawl time and can break.
  • Do not block 404 URLs in robots.txt, because Google may still list them without content.
  • Do not delete a page and leave its links pointing at it.
  • Do not ignore the 404 log for months, then try to fix hundreds of URLs at once.

Work through the list a few URLs at a time, starting with the ones that get the most visits. Our post 404 fix guide covers the same workflow for posts that return 404s while the rest of the site works.

Frequently asked questions

Do 404 errors hurt my WordPress site's rankings?

A few 404s do not hurt your whole site, because Google judges each URL on its own and a clean 404 is the correct answer for a deleted page. The damage comes from scale: many broken links waste crawl time, break the visitor journey, and can remove useful pages from the index. Fix the 404s that get traffic or links first.

Should I redirect all 404 pages to my homepage?

No. Redirect each moved URL to the closest matching live page, and let URLs with no replacement return a real 404 or 410 status. A redirect to the homepage sends visitors somewhere they did not ask for, and Google may treat a redirect to unrelated content as a soft 404. Only redirect to the homepage when the old page really was the homepage.

What is the difference between a 404 and a 410 error?

A 404 means the page was not found, which may be temporary, while a 410 means the page is gone for good. Google removes both from the index over time, but a 410 is a clearer signal that the page will never return, so Google tends to drop it faster. Use 410 when you are sure the content is permanently deleted.

How long does it take Google to notice a fixed 404?

Google says most sites should expect three days or more before a changed page is checked and indexed again. You can speed up the first check by using the URL Inspection tool in Search Console and clicking Request indexing, but the full update still depends on Google's crawl schedule. Recheck the Pages report after about a week.

Why does my WordPress site show 404 errors for posts that exist?

This usually means the permalink rewrite rules are stale or broken, often after a move, a plugin change, or a server update. Go to Settings, then Permalinks, and click Save Changes to rebuild the rules. If that does not work, check for plugin conflicts, clear the cache, and confirm the .htaccess file is writable on Apache servers.

Sources

  1. Troubleshoot Google Search Crawling Errors Google Search Central
  2. How HTTP Status Codes Affect Google's Crawlers Google Search Central
  3. How to create a 301 redirect in WordPress Yoast
  4. What is a redirect? Yoast
  5. 404 Monitor for WordPress Rank Math
  6. Google Soft 404 Errors: What They Are and How to Fix Them WP Rocket

Is your product missing, or something out of date?

Tell us what to add or correct. We read every note and reply when we need a source. A message does not buy a ranking.

About the editors

WPLegible editors

Researched from the primary sources listed above and checked against our editorial rules. About the site · How we test