
There are a lot of things about the 404 error page, today we will discuss what exactly means of 404 error page? and How to Redirect 404 Error Pages to Homepage on Blogger. But first, we will know what is meant by 404 Error Pages?
What is 404 Page?
Error 404 page is a static page that indicates warnings in the form of "Page Error 404", "Page Not Found" and which means to notify that the page that is accessed is no longer available. Typically, a 404 page appears when our URL entry is incorrect or the webpage has been removed. Because the URL is still indexed in Google search results or it could be due to URL changes made by the website owner after updating the page.
That's why a blog or website has a page or landing page specifically for error 404 pages by providing information that the destination page has been deleted or does not exist.
Well, now I will share an advanced method to redirect 404 error pages automatically to the homepage so that your blog can achieve the best SEO score.
How to Redirect 404 Error Pages automatically to the Homepage.
- Open Blogger.com
- Sign-in into Blogger Dashboard
- Select the Theme menu
- Click on Edit HTML
- Now Copy the following code and paste it just Above/Before </body> tag.
/* www.dgntemplate.in */
<b:if cond='data:blog.pageType in {"error_page"}'>
<script>
setTimeout(function () {
window.location.replace("<data:blog.homepageUrl/>");
}, 8000); //The redirection function will start after 8 seconds.
</script>
</b:if>
Now click Save Theme button
# If you want to redirect immediately, use the following code.
/* www.dgntemplate.in */
<b:if cond='data:blog.pageType in {"error_page"}'>
<script>
setTimeout(function () {
window.location.replace("<data:blog.homepageUrl/>");
});
</script>
</b:if>
/* www.dgntemplate.in */
<b:if cond='data:blog.pageType in {"error_page"}'>
<script>
window.location.replace("<data:blog.homepageUrl/>");
</script>
</b:if>
# If you want to redirect the 404 error page to another page instead of the homepage, replace <data:blog.homepageUrl/> with your page URL where you want to redirect.