Home » Blogger
Dec 5, 2013
Redirect Blogger 404 Error (Page Not Found) in Homepage
Whenever, by mistake, we or a user misspells an URL inexistent in our blog, it automatically redirects to the 404 error page (page not found). A message like this would appear:
"Sorry, the page you were looking for in this blog does not exist."
And probably this will not make a good impression on the greatest potential users of our blog. Before the user clicks the back button or close the window/browser's tab, thus leaving our site forever, we may want to redirect 404 error in Blogger to a page, where are chances that the visitor will continue reading our blog.
One of the most used methods is the "meta refresh" but the problem with this method is that it breaks navigation (doesn't allow returning back). In this case, the best method is by using Javascript which will be shown below.
First of all, go to your Blogger dashboard and then to Settings > Search preferences > Custom Page Not Found.
Copy and paste the following code:
Next thing to do is to save all changes made in this section and do a little test to check if the code works well. You can enter a nonexistent URL on your blog, and see if the 404 error page added previously appears, followed by a redirection after 5 seconds. That's it!
Tags:
Blogger
"Sorry, the page you were looking for in this blog does not exist."
And probably this will not make a good impression on the greatest potential users of our blog. Before the user clicks the back button or close the window/browser's tab, thus leaving our site forever, we may want to redirect 404 error in Blogger to a page, where are chances that the visitor will continue reading our blog.
One of the most used methods is the "meta refresh" but the problem with this method is that it breaks navigation (doesn't allow returning back). In this case, the best method is by using Javascript which will be shown below.
REDIRECT BLOGGER 404 ERROR WITH JAVASCRIPT
First of all, go to your Blogger dashboard and then to Settings > Search preferences > Custom Page Not Found.
Copy and paste the following code:
Sorry, the page you're looking for in this blog does not exist.The message which is going to be displayed can be edited as you want. If you are willing to redirect your blog 404 error page to another page other than your home page, just replace pathname to href and / with the url of your page. And finally, the number 5000 is the delay expressed in milliseconds. You can edit any value if this is more convenient.
You will be redirected to homepage shortly.
<script type = "text/javascript">
BSPNF_redirect = setTimeout(function() {
location.pathname= "/"
}, 5000);
</script>
Next thing to do is to save all changes made in this section and do a little test to check if the code works well. You can enter a nonexistent URL on your blog, and see if the 404 error page added previously appears, followed by a redirection after 5 seconds. That's it!
You may also...
Hot
-
PHONG THỦY LUẬN . Phần 2 : KHẢO QUA HUYỀN KHÔNG. MỘT SỐ QUY TẮC CỦA CỔ DỊCH HUYỀN KHÔNG. 6/ TÀI LIỆU THAM KHẢO : NGHỆ THUẬT ĐIỂM THẦN SÁT ....
-
Bộ ảnh bìa Facebook chủ đề Nắng tuyệt đẹp dành cho các bạn...
-
XEM TỬ VI TUỔI MẬU THÌN 1988 NĂM 2014 GIÁP NGỌ Tử vi năm 2014 Giáp Ngọ cho NAM XEM TỬ VI TUỔI MẬU THÌN 1988 NĂM 2014 GIÁP NGỌ Tử vi năm 2014...
-
Những bức ảnh cận cảnh của nhiếp ảnh gia Vadim Trunov đã đặc tả thế giới côn trùng trong vườn nhà ông ở Voronezh (Nga) phản ứng như thế nà...
-
XEM TỬ VI TUỔI KỸ HỢI 1959 NĂM 2014 GIÁP NGỌ Tử vi tuổi Kỹ Hợi 1959 cho Nam XEM TỬ VI TUỔI KỸ HỢI 1959 NĂM 2014 GIÁP NGỌ Tử vi tuổi Kỹ Hợi 1...
-
Ảnh bìa Facebook Giáng Sinh, NOEL đệp nhất - Tổng hợp
-
XEM TỬ VI TUỔI ĐINH HỢI 1947 NĂM 2014 GIÁP NGỌ T ử vi tuổi Đinh Hợi 1947 cho Nam XEM TỬ VI TUỔI ĐINH HỢI 1947 NĂM 2014 GIÁP NGỌ T ử vi tuổi ...
-
XEM TỬ VI TUỔI GIÁP THÌN 1964 NĂM 2014 Tử vi tuổi Giáp Thìn 1964 năm 2014 cho Nam XEM TỬ VI TUỔI GIÁP THÌN 1964 NĂM 2014 Tử vi tuổi Giáp Thì...
-
Xếp hạng Alexa luôn là một chỉ số quan trọng khi đánh giá một trang web. Để có một vị trí cao trong bảng xếp hạng của Alexa bắt buộc si...
Comments[ 0 ]
Post a Comment