You are here
Home > Blogging Website > Redirect all 404 errors to the Homepage – blogger Tutorial

Redirect all 404 errors to the Homepage – blogger Tutorial

QnA Collection

Today I will show you how to redirect all 404 errors to the Homepage in the blogger. 404 Error is very harmful to any site, especially for Google search engine and visitors. If you have these 404 errors on your site, fix them now.

I will show you that method, but first, you need to know how a 404 error is created. Because 404 errors are created by you, they can happen without your knowledge. If you know the reasons, don’t make those mistakes anymore.

Redirect all 404 errors to the Homepage
Type Of 404 Error
Redirect all 404 errors to the Homepage
Type Of 404 Error

How is a 404 error created on the site?

  • Although there are many reasons, the main three are-
    1. If you delete a post or page,
    2. If you change the URL of a post or page,
    3. Adding a domain after the website is indexed in the search engine,

As you can see from the above reasons, errors are created by you. So don’t make these mistakes again, if you have already made a mistake then redirect 404 errors to the homepage of the site. If that redirection is automatic then very good, I will now show that redirection method-

how do Redirect all 404 errors to the Homepage Automatically?

First, download the code file by clicking the download button below. In that file, you will find an HTML code and a CSS code. The CSS code needs to be added to the theme but the HTML code is already in your theme, just need to replace it.

READ THIS  what is content marketing? benefits of content marketing in 2022

NOTE:- I always say before any change in the theme, you should definitely back up. So first of all take a backup of the theme, if any mistake is made then you can restore the site.

1. CSS CODE PLACEMENT:-

  • Open the HTML code of your theme and find ]]></b:skin> ,
  • Paste the CSS code before “]]>: skin>” and save the theme for the first time.
Redirect all 404 errors

2. FIND ANY 404 PAGE:-

  • First, visit a post or page of your site then you will get the link of the article, for example- https://yourdomainname.com/2020/22/post-name.html.
  • Now delete any word of the post name in the URL and press enter. Then the 404 interfaces of your site will open, as you can see in the image below.

NOTE:- Now if your 404 page is automatically redirected to the homepage, then you know that your site already has this feature. Otherwise, follow the procedure below and activate 404 redirections.

Type Of 404 Error
Type Of 404 Error
Type Of 404 Error
Type Of 404 Error

In the two pictures above, you can see 404 interfaces of two types. There are differences in design between the two images but there is a similarity. That is, even if it is small, there must be a description or paragraph, you must have a 404 interface like this. Now follow the below steps-

3. HTML CODE PLACEMENT:-

  • Copy some text from the paragraph of your 404 error interface,
  • Now go to the theme and search the copied text, then you will get 404 HTML code. That code will look a bit like the code below.
Redirect all 404 errors to the Homepage
  • Remove all this code and paste my HTML code.
  • Save the theme and visit your site 404 errors in this way.
READ THIS  How to Create Automatic Internal links in Blogger Post

4. HOW TO CHANG REDIRECTION DELAY TIME:-

See the image below to change how soon the 404 page will be redirected to the homepage.

all 404 errors to the Homepage

Bengali Video Tutorial

Top