Clicky

Tutorials

How to Fix 404 Errors on WordPress Posts

404 Errors are really annoying. Its annoying to the visitor as well as website admin.

In WordPress, 404 errors are one of the most common problems experienced by WordPress users. But it’s also fairly easy to solve it in WordPress.

This problem occurs when you’re trying to redirect to a non-existing page/post from a page/post. It is an error that is generated by your server when the requested URL is not found.

Now that you know what causes 404 errors, let’s discuss how you can fix these errors.

Fix 404 errors on WordPress posts

As an admin, the first thing that comes to mind is to redirect. But, redirection should be used wisely as redirecting all 404s to homepage or any other page is bad for your Google search results.

Google says:

Returning a code other than 404 or 410 for a non-existent page (or redirecting users to another page, such as the homepage, instead of returning a 404) can be problematic. Firstly, it tells search engines that there’s a real page at that URL. As a result, that URL may be crawled and its content indexed. Because of the time Googlebot spends on non-existent pages, your unique URLs may not be discovered as quickly or visited as frequently and your site’s crawl coverage may be impacted.

We recommend that you always return a 404 (Not found) or a 410 (Gone) response code in response to a request for a non-existing page. You can improve the user experience by configuring your site to display a custom 404 page when returning a 404 response code.

So you should only redirect those posts or pages which actually existed and is relevant for you. If the content existed, then only you should use redirects, else don’t.

Generally, 404 errors are caused by the web server or your WordPress. When your .htaccess file gets deleted or something goes wrong with your write rules.

To fix it, you need to go in your WordPress admin area. Here go to Settings > Permalinks.

Here you might get one of the two things under the “Save Changes” button:

  1. Some text informing you that your .htaccess isn’t writable, like this
    wordpress htaccess not writable
  2. Or nothing

Better to have the second option, because you just have to save the changes by clicking the “Save Changes” button. Doing this will update your Permalinks settings and flush your write rules and also fix the 404 error on your WordPress posts.

But then, if you are getting the message of .htaccess file being not writable, you don’t need to worry. Because it is very easy to change it.  For this you have to connect to your site via FTP change the properties, the permissions, of the file.

After this, you need to overwrite current .htaccess with the default one. Here’s the code snippet for it:

[php]

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ – [L] RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L] </IfModule>

[/php]

Once you change this, make sure you save the changes. Again go to your WordPress admin area in Settings > Permalinks and save changes.

This is solve 404 error on WordPress posts in most cases. But if you’re still experiencing the problem you need to contact your hosting provider.

Conclusion

I hope this article was useful in helping you fix 404 errors on your WordPress posts/pages. Was this solution useful? Do you have any suggestions or experience to share us? Please do in the comments section below. It helps us lot.

Also read: 7 Common WordPress Issues and How to Fix Them

Share this Story
Load More Related Articles
Load More By Editorial Team
Load More In Tutorials

Leave a Reply

Your email address will not be published. Required fields are marked *

Join Over 50,000+ Subscribers

Interested In
  •   
  •           
  •                      

Search