Press "Enter" to skip to content

Too many 404 errors and others? Use 301 redirect today on your WordPress website

Are you currently facing too many errors like 404, soft 404 error e.t.c on your WordPress, probably after migrating from Blogger to WordPress? You now have an absolute solution to clean up your entire website and restore back your SEO and traffics.

404 error can hurt a website SEO – Search Engine Optimization, it means the requested URL cannot be found. However, this could be the result of a broken link from image or a typo when inserting a link and also, it could be from a changed link.

A 404 error doesn’t mean something is wrong with your website but it can affect users experience, affect your Alexa ranking and others and can affect earnings. A site with 404 errors cannot convert, or get traffics. Instead, users will continue to leave till the downfall of the website.

So, a website owner need to always review his or her blog for any errors or use Google webmaster console for quick notification.


Read Also: Stop Paying For TV And Radio Ads Now! See reasons why Facebook Ad is the best for your business


In this article, you’ll be acquainted on how to fix 404 errors with just a 301 redirect code on your header. With this code, you don’t need to always edit 404 error one by one, and it will help you redirect all those broken links and restore back your lost traffics and SEO.

Let’s see how…

STEP 1: Login into your WordPress dashboard.
STEP 2: Go to your Appearance and click on “Theme”.

STEP 3: Then, locate 404.php error document file.


STEP 4: And paste this code, just after the first line of the code. As shown below:

header(“HTTP/1.1 301 Moved Permanently”);
header(“Location: “.get_bloginfo(‘url’));

STEP 5: Now, save the file.

Note: If you notice your WordPress version doesn’t allow you to edit your theme, kindly install “Theme Editor plugin” and follow the steps above.

STEP 6: Now, go to your website 404 error page and it will successfully redirect you back to your homepage. That means the 301 redirect is active.

So, within a month, your SEO will get back to its previous status and your rank will get better and higher.

Benefits of 301 redirect code

1. It helps you fix 404 and other errors hurting your website.
2. ‎It fix broken links and images.
3. ‎Since 301 redirect means “Moved Permanently”, it helps you tell Google that you have moved permanently from one website to another.
4. ‎It helps you transfer SEO from one website to another.
5. And many more.


Read Also: Error Fixed: WordPress inability to edit and save theme PHP files


Have your say in the comment section below!


  1. Bright Bright May 4, 2018

    Nice one precious. My ADM is showing ssl certificate error with whatsvpn. Got any way I can fix it?

    • Prexblog Prexblog Post author | May 4, 2018

      Use another website to download your files.

  2. Marveln Marveln May 5, 2018

    Looks cool. Not a blogger tho

  3. Harun Khalid Adeiza Harun Khalid Adeiza May 8, 2018

    Very interested. But I am not a blogger yet

Leave a Reply

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