How to Auto Redirect from 404 Page to Home Page ?
Hello Bloggers , Today in this post am gonna share a script which will auto redirect your website users to homepage, You need not add redirection for every link just you have put one script and it will do the rest. So Read the Post Completely, So that you won't get any issue while installing the Script.
|How to Auto Redirect from 404 Page to Home Page ? |
It is undeniable that broken links on blogs can be admittedly quite difficult to overcome. The causes can vary, ranging from the negligence of the blog admin who misplaces or writes links in other articles, has deleted the related link.
Or it could also be caused by search engine crawling that mistakenly translates the URL of the article on the blog.
Well, this error URL can be optimized in a special way. Namely by redirecting it to the blog homepage or to a specific page.
How to Auto Redirect All 404 Error Page to Home Page?
<b:if cond='data:view.isError'> <script> window.location.href = "<data:blog.homepageUrl/>"; </script> </b:if>
Step 4. Done ! Click On Save.
Note: If you want to redirect to somewhere else or If its not redirection correctly then use the below code.
<b:if cond='data:view.isError'> <script> window.location.href = "https://www.spiderbloggingi.in/"; </script> </b:if>