08 Nov, 2009
Custom 404 Page – Google Search Widget
You are here: Home » SEO » Custom 404 Page – Google Search Widget
The topic of custom 404 pages has been done to death within the SEO industry, as everybody tries to give you the best tips on optimising your 404 page. However, I still come visit countless websites where there is either no 404 page, or simply a blank page with an even blanker message provided. I won’t go into all the “do”s and “don’t”s of optimising a custom 404 page, but the Enhance 404 Widget by Google is a great way to provide a custom search box to your users.
Firstly, if you haven’t already got a custom 404 page, then now is your time to set it up. You can find more information on how to do this at the following places:
Now, adding a custom search box couldn’t be easier thanks to Google. Here is how.
1. First, go to the Google help centre and select your language.
2. Once you have selected your language, the JavaScript code you need will appear. If you are English (United Kingdom) then the following code will be displayed:
<script type=”text/javascript”>
var GOOG_FIXURL_LANG = ‘en-GB’;
var GOOG_FIXURL_SITE = ‘http://www.example.com’
</script>
<script type=”text/javascript”
src=”http://linkhelp.clients.google.com/tbproxy/lh/wm/fixurl.js”>
</script>
3. Copy the code and insert it into your 404 page.
4. Change the ‘http://www.example.com’ to the URL of your website.
5. Upload the changes and you are good to go!
Once you have uploaded the new code, users will be presented with a Google search box when they arrive on a page that doesn’t exist – an example of which is below.

It’s up to your whether you add a picture of a donkey or not.
Although this search box technique may seem redundant on blogs or websites where a search box already exists, it provides an extra means for users to find the information they were originally looking for. The added advantage of this Google code is that it provides a link to the original page if the user has just misspelt the URL.
What are your thoughts on this Google widget?



