W3 Mind Logo
Home » Redirecting your 404 page to the Home Page in WordPress

Redirecting your 404 page to the Home Page in WordPress

Add the following code in 404.php file in your theme’s folder. And If there is no 404.php file available in your theme, then create a blank php file. Paste the following code in there:

				
					<?php
header("HTTP/1.1 301 Moved Permanently");
header("Location: ".get_bloginfo('url'));
exit();
?>
				
			
About Author
Picture of W3Mind

W3Mind

W3Mind focuses on Blogging, Make Money Online, SEO, Business Blogging, Social Media, WordPress, Internet Tools, Web Design and Development.
Give it a Share
Facebook
Twitter
LinkedIn
You May Also Like
How to
START A
BLOG
(step by step)
Load WordPress Sites in as fast as 37ms!