Skip to main content

Custom 404 Error Pages for Blogger

Blogger Error page will display this error message
custom 404 page for blogger
You can Change this message to something else from the Blogger Settings.
The option is there at Settings > Search preferences > Custom Page not Found
blogger-custom-404-message

Instructions

  1. Login to your Blogger account and go to the Template page and proceed to Edit HTML
  2. Click on the Expand Widget Templates Check box so that your entire template comes up
  3. Now Look for </head> and immediately before that paste this snippet
    <b:if cond='data:blog.pageType == "error_page"'>
    <style type="text/css">
    .status-msg-wrap {
        font-size: 100%;
        margin: none;
        position: static;
        width: 100%;
    }
    .status-msg-border {
        display:none
    }
    .status-msg-body {
        padding: none;
        position: static;
        text-align: inherit;
        width: 100%;
        z-index: auto;
    }
    .status-msg-wrap a {
        padding: none;
        text-decoration: inherit;
    }
    </style>
    </b:if>
    This code snippet will reset the default styling given to the Blogger Message Wrapper.
  4. Save the template and go to a page on your blog which doesn’t exist.
  5. You should be able to see the change now. The grey background and the border around the 404 status message would no longer be there.
  6. Now Let’s see how we can improve the look and feel of our 404 page. I would suggest you to use inline CSS styles to improve the look and Feel of your 404 message.Here is a sample HTML template which you can paste into the text box atSearch preferences > Custom Page not Found.
    <h3>Your requested page was not found</h3>
    <p>Sorry, we cannot find the page that you are looking for. It might have been removed, had its name changed, or is temporarily unavailable.<br/>
    Please check that the Web site address is spelled correctly.</p>
    <b>Other things to try:</b><br/>
    <ul>
    <li>Go to our <a href="/">home page</a>, and use the menus or links to navigate to a specific post.</li>
    <li>
    <form method="get" action="/search">
    <table width="100%">
    <tr>
    <td><input type="text" style="width:95%;padding:2px;" value="Search this blog.." onfocus="if (this.value == &quot;Search this blog..&quot;) {this.value = &quot;&quot;}" onblur="if (this.value == &quot;&quot;) {this.value = &quot;Search this blog...&quot;;}" name="q"></td>
    <td><input type="button" Value="Search"></td>
    </tr>
    </table>
    </form>
    </li>
    </ul>
  7. It will give you something similar to my 404 page.
  8. If you are creative, you can add more stuff to the 404 pages. You can find a list of really creative 404 pages on HongKiat for inspiration

Detecting an Error Page

Blogger has introduced a new page type called "error_page" and you can detect it using b:if conditional tags.
The following condition checks if a page is an error page or not.
<b:if cond='data:blog.pageType == "error_page"'>
This is an Error Page
</b:if>

Changing the Error Page Title

By default the title of the Blogger Error Page is your Blog Title. If you want to change it to something else, you can Edit your template and change
<title><data:blog.pageTitle/></title>
to
<b:if cond='data:blog.pageType == "error_page"'>
<title>Page Not Found</title>
<b:else/>
<title><data:blog.pageTitle/></title>
</b:if>
If you are using my Title Tag Hack or derivatives of that available on the internet, then you will have to change
<!-- Start  -->
<b:if cond='data:blog.url == data:blog.homepageUrl'>
<title><data:blog.pageTitle/></title>
<b:else/>
<title><data:blog.pageName/><b:if cond='data:blog.pageName'> - </b:if><data:blog.title/></title>
</b:if>
<!-- End –>
to
<!-- Start -->
<b:if cond='data:blog.url == data:blog.homepageUrl'>
<title><data:blog.pageTitle/></title>
<b:else/>
<b:if cond='data:blog.pageType == "error_page"'>
<title>Page Not Found</title>
<b:else/>
<title><data:blog.pageName/><b:if cond='data:blog.pageName'> - </b:if><data:blog.title/></title>
</b:if>
</b:if>
<!-- End –>

Comments

Popular posts from this blog

Zomi: Who They Are

Zomi Total population ca. 2,500,000 Languages Various Kuki , Mizo , Chin , Naga , Paite Religion Christianity , Animism , Buddhism , Laipian Related ethnic groups Naga , Meitei , Hmar , Mizo , Kuki Zomi [1] is the name of a major tribe found in various parts of South and South East Asia. The term Zomi meaning, Zo People [2] is derived from the generic name 'Zo', the progenitor of the Zomi. They are found in northwestern Myanmar, northeastern India and Bangladesh. Anthropologists classify them as Tibeto-Burman speaking member of the Mongoloid race. In the past they were little known by this racial nomenclature. They were known by the non-tribal plain peoples of Myanmar, Bangladesh and India as Chin, Kuki, or Lushai. Subsequently the British employed these terms to christen those 'wild hill tribes' living in the "un-admiral. They are Zomi not because they live in the highlands or hills, but are Zomi and call the...

Proxy for Myanmar

Address ah 79.125.28.242 leh Port ah 443 194.12.240.149 443 87.120.58.129 8080 141.24.249.129 3124 128.59.20.227 3124 212.93.193.83 443 212.93.193.82 443 212.93.193.84 443 212.93.193.72 443 70.20.10.30 80 70.20.10.40 80 203.81.166.6 > 8080 124.30.27.20>8080 121.243.32.138>3128 82.75.182.22>9000 190.146.127.152>444 71.235.209.187>8080 203.81.166.20 > 8080 203.81.166.21 > 8080 203.81.163.66 > 80 70.20.10.30 > 80 70.60.20.30 > 80 72.52.96.31 > 80 203.163.81.66:80 70.85.16.16 :80 က usa proxy 203.81.1...

Zawgyi KeyBoard Installer For Windows 7

Zawgyi Font for Bit 64 1. Firstly, install the file. The File is Zawgyi Font for Windows 7 . 2. Download this software, its a keyboard for  Zawgyi. 3. Go to "Text Services and Input Language" in Control Panel >>Fonts; and Select "Zawgyi Myanmar Unicode L" Then all will be ok! If you still have some problems on Bit 64, you can run Alpha Zawgyi and then, run the given file from Mediafire . That is "ZawGyil_amd64.msi, ZawGyil_i386.msi and ZawGyi_ia64.msi". Among all these three, you can choose whatever u wanna install, which of them is ok, that means you run one ".msi" file from the downloaded file. It will solve your problems. If you still have problem on installing Zawgyi keyboard on Windows 7, You add this IEZawgyiGtalkFont . Download this and run it. There will be ok! Zawgyi Keyboard Installer for Bit 32. Zawgyi Keyboard Installer for Bit 32 is to run Alphazawgyi only. If you run Alpha Zawgyi , everything is ok.