How to Fix or Redirect 404 Not Found error in wordpress




404 not found fix

404 Not found” errors are the major problem for many websites. To solve this problem, we try to create a custom 404 page. If you are a PHP guru then you can create it easily or else it will be difficult and takes lot time to create it. You are not having enough time to create a custom 404 page. In such case, you can redirect the 404 page to your website’s homepage. Let us see how to redirect 404 pages to home page in WordPress.


What Is 404 or Not Found?

The 404 or Not Found error message occurs when the server could not find the user page request. It happens mostly when users attempts to open the "break or dead link". These 404 or not found errors can be solve easily by creating custom 404 page or redirecting the broken link[your websites broken link] to your website’s homepage

How to Redirect 404 Pages?

[Note: Only for Wordpress Users]

Login to your FTP account and search for the "404.php" file in your themes folder. Now open the 404.php file and paste the below code before the </head> tag. If the file doesn’t exist, then create a blank php file. Paste the following code in there:

1 <?php
2 header("HTTP/1.1 301 Moved Permanently");
3 header("Location: ".get_bloginfo('url'));
4 exit();
5 ?>

That’s all. Now when a user tries to open a 404 page. It will be redirected to your website’s homepage.

Tags: 404 not found error fix, 404 not found , error 404 not found, 404 not found page, 404 not found fix, 404 time not found, html head title 404 not found, 404 not found error fix for wordpress, how to redirect 404 error page, php redirect to 404 error page, how to redirect 404 error page in php, htaccess 404 error redirect, htaccess 404 redirect to homepage, htaccess page not found redirect, fake 404 error page, htaccess redirect 404, 404 redirect using htaccess,




 

© 2011 ShareUsAll - Share in Advance All Rights Reserved Shareusall | |