Everybody in this world who uses internet must have faced 404 - Page Not Found
error at any given time. HTTP error code 404 is the most common error code in WordPress.
Being very powerful CMS with only minor changes to your WordPress setup may result into lots of 404 errors. In this tutorial we will go over steps on how to find and solve 404 errors using .htaccess file.
What is HTTP 404 Error Code?
HTTP 404 means – your client request is able to connect to the server but the content you are requesting doesn’t exist.
How to find?
Best way to find 404 error for your WordPress blog is to use Google Webmaster tools
.
- Go to your blog
- Click
Crawl
- Click
Crawl Errors
- Find the list of URLs with 404 errors
Checkout latest screenshot.
How to fix 404 – Page Not Found error?
There are multiple ways: Look for URLs
just bottom of the page. You should see something like this:
If it’s simple Tag issue
then try adding tag manually to respective related posts and issue should resolve.
If there is an issue with main post URLs then follow below steps:
- Open your blog’s
.htaccess
file which will be in your site’s root folder mainly under public_html folder. - Add
301 Moved Permanently
to it. 301 means current links or records using the URL that the response is received for should be updated. - Google recommends using a 301 redirect to change the URL of a page as it is shown in search engine results.
Format:
Redirect 301 "Old dead link" "New working link"
Why 404 Page Not Found error happens?
There are multiple reasons. Sometime you remove a post for some reason and suddenly all of your tags associated with that post also gets deleted. Now if you have some reference in feed, other posts, social media account and user clicks on those links then it generates 404 error.
Also, suddenly if you see so many 404 errors
on you blog then it usually happens if your .htaccess file got deleted or something went wrong with the rewrite rules
. Here is what you need to do is fix your permalinks settings.
If you have above similar setting then your .htaccess content should look like below. It’s better to verify one more time 🙂
# BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress
We hope this tips will help you fix HTTP 404 errors. Did this work? Or Do you have another tips which you would like to share?