One of the worst feelings as a website user is to click a link and land on a 404 error page. The 404 is one of the most harmless error codes on the internet, as it only indicates the requested page is missing. However, it can also be one of the most frustrating for users, because the content they’re looking for disappears into a puff of smoke. Search engines also need the correct status code to understand that a page is missing. Luckily, fixing the WordPress 404 error and making it so that your site UX is top-notch for both search engine crawlers and normal users is pretty straightforward.
What Exactly Is A 404 Error Code?
The dreaded 404 is an HTTP response status code. It’s similar to the 503, 500, 301, and so on that you may see occasionally. They’re not all bad. For instance, a 301 response code just means that one page has been permanently redirected to another. The 404 is one of the bad ones, though — the 400 and 500 blocks are the ones to watch out for the most as they’re the client and server errors respectively.
Here is how the Mozilla Developer Network (MDN) defines the 404:
The HTTP 404 Not Found client error response status code indicates that the server cannot find the requested resource. A 404 status code only indicates that the resource is missing without indicating if this is temporary or permanent. If a resource is permanently removed, servers should send the 410 Gone status instead.
The important point to remember is that a 404 covers two cases: the URL is not recognized and the URL is valid but the resource itself does not exist. We’re going to show you how to deal with these kinds of issues so that you can limit the 404s on your site to only those (hopefully) you have no control over.
When Is A 404 Not Really A 404?
Well, technically a 404 is always a 404. But sometimes, a 404 pops up when there’s nothing you can do about it, and the two cases above explain why.
For instance, there’s nothing you can do about someone typing in your website’s URL incorrectly. If they are trying to reach elegantthemes.com/blog and they type in elegantthemes.com/blag, they’re going to get a 404 error. Our site isn’t set up incorrectly and nothing is wrong — they just had a typo. That’s a URL the server does not recognize.
And when the URL is valid but the resource itself does not exist, what happens is that the URL itself is fine. It has been typed in perfectly, the link is/was correct, but whatever it’s pointing at has moved. Maybe it was linking to a elegantthemes.com/divi-changelog.pdf, but we renamed the file to changelog.pdf. The user would get a 404 without having done anything wrong, and since that would be on our end, we could fix it with a simple 301 redirect.
Or if the person goes to elegantthemes.com/blackfriday a day before the sale starts. What greets them? They get a 404. They did nothing wrong, the page hasn’t gone live yet. The URL is correct, and the content exists, but the browser can’t return it because it’s not technically on the internet yet. Again, it’s a 404, but not really.
With all that in mind, however, let’s get to the ones beyond your control and that your visitors can’t fix with a few presses of the Backspace key. Also remember that these kinds of 404 errors won’t impact SEO, generally. Because search engines will find the content that’s there and not typically enter the wrong URL.
How To Find WordPress 404 Errors
When working in WordPress and trying to find all the 404 errors that your site might have, you can start at any number of places or use any number of methods. There are, however, some pretty easy and simple ways to track them down.
Google Search Console
One of the top tools for anyone who owns a website is Google Search Console. If you’re not familiar with it, this is the time to dig in and become friendly, because this one dashboard gives you just about as much insight into your website as you could want. If you’re familiar with how Google Analytics breaks down your metrics, the Search Console does it similarly.
To check the errors Google has found, open Indexing > Pages in the left sidebar. Scroll to Why pages aren’t indexed and select Not found (404) to see example URLs. If Google has detected soft 404s, a separate Soft 404 row appears. Not every property has both reasons; this example has a Not found (404) row only.

You will see the number of indexed and not indexed pages over time, as well as be able to get detailed analysis of each reason by clicking into it. The Google Search Console also provides documentation on how to deal with different issues and error codes. For instance, this is the document for fixing soft 404 errors, which are pages that show a not found message but return a success status code.
Check External Links
In WordPress (and other CMS platforms, too), you can change your permalinks very easily. In WP, you just need to go into Settings > Permalinks, and you can make the URLs for your site show up in any structure you want. Any time you want. But you don’t want to change these willy-nilly. Because other sites have (likely) linked to your site already. Anyone who then clicks their link will be taken to a 404 page.

Illustrative custom 404 page, built as an editable HTML example.
Giving people a redirect link or search box helps alleviate some of the pain so they can find the page they’re looking for, but you will want to make sure that’s kept to a minimum. To do so, you will want to check your External Links in Google Search Console. You will find it under Links > External Links > Top Linked Pages.

When the report contains external links, click More under Top linked pages to explore them. Search Console reports a sample of links, rather than every backlink. In the example above, Google reports no external-link data, so there is no list to expand.
Check the old URLs you find against their intended destinations. If a page moved from example.com/post-name to example.com/author/post-name, add a 301 redirect with a plugin such as Redirection. Enter the old URL as the source and the replacement as the target.

A redirect-flow illustration; this is not a plugin interface screenshot.
A redirect applies only to the source URL you configure. Send it to a relevant replacement and test the old link afterward. If no replacement exists, keep a helpful 404 page rather than redirecting every missing URL to your homepage.
How To Create Your Own Error 404 Not Found Page
Fixing the Error 404 page is one thing. But no matter what steps you take to keep it from happening, someone will eventually land on the error page, and you want to be ready for that. Luckily, creating a 404 page is pretty simple.
In some cases, your theme might have a WordPress 404 error page already created. You can check this under the wp-content > themes > theme-name folder. You are looking for a file called 404.php. (A block theme keeps it as a 404.html template, which you edit in the Site Editor.) This lets WordPress direct the browser to a specific page rather than showing a default page with no content.

Template locations for classic and block themes.
The diagram above shows the two template locations. In a classic theme, 404.php controls the missing-page layout, including its HTML and PHP template functions. If you’re a hand-coder, all you have to do is write the code you want to display and save the file via FTP or your file manager. Now, any visitors who get the error will be directed here.
Please remember that any customization that you make to your theme’s 404.php will be overwritten by updates, so make sure that you do any edits in a child theme. You can find additional details on creating a 404 page in the WordPress Codex or our own detailed guide.
Creating A Custom 404 Page In Divi
If you are a Divi user, we have you covered, too. The Divi Theme Builder gives you a ton of flexibility in creating custom 404 pages.

Choose 404 Page when you create a template and it applies to every missing URL. Be sure to check out our eight free 404 designs for Divi 5, which walk you through importing one and building it out.
Plugins To Create A 404 Error Page
If you’re either not a Divi user or don’t want to worry about editing PHP files, never fear. The WordPress.org Plugin Repository has plenty of options for you to choose from to create your own custom Error 404 page and redirect it back to where you need it to be. We have gathered a list of some of the most popular and highest-rated options.
- All 404 Redirect to Homepage
- Custom 404 Pro
- Smart Custom 404 Error Page
- 404 Solution
- 404 to 301 – Redirect Manager, 301 Redirection, 404 Error Logs & 404 Monitoring
- WP 404 Auto Redirect to Similar Post
Give Visitors A Useful Next Step
Fix broken internal links and add 301 redirects when content has moved to a relevant replacement. A missing page without a replacement can correctly return 404 or 410; you do not need to eliminate every such response. Use Search Console and your server logs to find recurring problems. For visitors who still reach a missing URL, provide a search box and useful navigation while keeping the correct 404 status.
What do you do to manage your HTTP error 404s?

Is redirecting all 404 pages to homepage recommended at all?
Hello, Thank you for this Help. But, this needs much technical expertise to do that. Is there any plugin for this purpose which can help the non-technical users? Thanks in advance.
Hi, I created a site in Google Cloud Platform and struggled with this particular issue of “404 page server error” as none of the standard pages such as home, blogs and contacts showed up. Frustrated, I was trying out various forums for support. But I tasted success here, by changing the Permalinks settings to plain as suggested in this post. Now, all the pages are displaying! Awesome!!!! I used to always chose “post name” under settings/permalinks/ as the default one. (I am more familiar with the WordPress.org option) My question is, is it because of the difference between WordPress.com and WordPress.org this issue comes up? However, I am elated by this solution and thank you for clearing me from this quagmire . With regards
Thank you for letting us know what solved the issue for you in case anyone else runs into the problem.
A plugin was the problem for me; I deactivated it and had to edit the page somehow. It wasn’t that nice but it worked. This really helped and saved me a lot of stress.
Yes, I need this. I have some trouble with 404 error. I found it from Google Search Console notification. It happened when i decided to change my permalinks settings. Then I used WP 404 plugins to redirect it. Thanks for the info.
Yes, I also need this for my website but right now i am using rankmath for404 redirection.