Web Toastie


Social Media and SEO Blog of a Search Marketing Consultant

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.

Custom 404 Page

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?

Enjoyed this post? Enter your email address here to receive updates whenever a new article is published on Web Toastie:

Delivered by FeedBurner

2 Responses to "Custom 404 Page – Google Search Widget"

1 | Backlink Tips

March 19th, 2011 at 5:32 pm

Avatar

Hi there, i read your blog occasionally and i own a similar one and i was just wondering if you get a lot of spam remarks? If so how do you reduce it, any plugin or anything you can advise? I get so much lately it’s driving me crazy so any support is very much appreciated.

2 | wwe wallpapers

July 4th, 2011 at 1:18 am

Avatar

Just about all I can point out is, I am not sure what to express! Except certainly, for the amazing tips that happen to be shared with this blog. I can think of a million fun tips on how to read the content on this site. I believe I will finally take action utilizing your tips on that matter I could not have been able to address alone. You had been so careful to allow me to be one of those to profit from your beneficial information. Please know how great I enjoy the whole thing.

Comment Form



  • wwe wallpapers: Simply killing some time in between class time on Digg and I found your article . Not normally what I choose to examine, nevertheless it was completel
  • wwe wallpapers: It’s rare to get an experienced person in whom you may have some trust. In the world at present, nobody definitely cares about showing others the be
  • wwe wallpapers: It was a real contentment locating your site a short while ago. I came here right now hoping to find out new things. And I was not upset. Your ideas i

About

Web Toastie is a social media and SEO blog.

Web Toastie features articles about SEO industry news, web development and advances in social media. If you wish to contact us, you can do so through the online contact form.