404 Not Found Errors

4
120 followers

Having Trouble With 404 Page Not Found?

I had a couple of issues with 404 not found pages in my Google console after I deleted the posts from my website.

If anyone is having the same issues here is how to rectify it.

Login to wordpress click on Edit Themes. Look for the 404 template and right at the top paste this code in: Save it. This will redirect any 404 not found error pages to your Home Page.

This solves the problem. Check any 404 error links that you may have on your console.Once you paste in this code to back and click on the error links and it should go straight to your home page.

<?php
header(“HTTP/1.1 301 Moved Permanently”);
header(“Location: “.get_bloginfo(‘PLACE YOU HOMEPAGE URL HERE’));
exit(); ?>

Hope this is helpful

Peter.

Login
Create Your Free Wealthy Affiliate Account Today!
icon
4-Steps to Success Class
icon
One Profit Ready Website
icon
Market Research & Analysis Tools
icon
Millionaire Mentorship
icon
Core “Business Start Up” Training

Recent Comments

2

I got some in my site, so I will bookmark this post of yours and try the suggested codes.

Thanks, Peter! More power to you and God bless. :)

You can also type in a different url if you want the 404 to go to a different page.

See more comments

Login
Create Your Free Wealthy Affiliate Account Today!
icon
4-Steps to Success Class
icon
One Profit Ready Website
icon
Market Research & Analysis Tools
icon
Millionaire Mentorship
icon
Core “Business Start Up” Training