MrinTech

Computers, Technology & More

  • Home
  • Subscribe
  • About
  • Contact
  • Blog Archive
  • Disclaimer
  • Privacy

Enhance your Wordpress 404 Page with Google Search

Now you can harness the power of Google Search for your Wordpress 404 Error (Not Found) Pages!

wordpress google custom search

If you are blogging over Self Hosted Wordpress Installation, than this post tells you How you can add Google Custom Search to your Wordpress 404 Error Pages?

What is 404 Error (Not Found) Page:

When visitors to your Wordpress Blog / Website lands on a particular page which doesn’t exists at all, they get a 404 Not Found Error. Following are some common reasons when a 404 Not Found Page is displayed:

  • Suppose you have a Wordpress Page with URL slug as /abcd and some external site linked to this page with a wrong URL slug /abdc. Now when a visitors lands on this Page, your Wordpress Installation will give a 404 Error to him/her.
  • You made a Page Private after Publsihng it, now when a Visitor lands on this Page he/she will get 404 Error.
  • There can be some more reasons. You can read more about 404 Not Found Error right here

How to Add Google Custom Search to 404 Not Found Pages?

1. First of all go to Google Web Elements Custom Search Page. Here you will get 3 Options for your Custom Search Engine:

google custom search options

  • Automatically Search My Site – Option common to all users.
  • Search my Site & Use AdSense for Search – This option is useful for those having a Google AdSense Account.
  • Use an Existing Custom Search Engine – If you have created a Custom Search Engine Earlier, than you can simply enter your Custom Search ID (E.g. 012345678901234567890:abcdefghijk)

2. Select Appropriate Option as per your Requirement and copy the JavaScript Code. Now Login to your Wordpress Dashboard, Here go to Appearance >> Editor >> 404 Template (404.php)

3. Here you have to insert the Javascript Code in appropriate location with reference to Screenshot Below:

google custom search

(If you face any problem while entering the JavaScript Code, please use the Comment Form below)

4. Save the 404.php Template and it’s all done!

The main advantage of Google Custom Search is that, Related Posts/Pages gets displayed just under the Custom Search Box pertaining to the Search Query. This means your visitors will remain only on the 404 Not Found Error Page, but can search anything included in your Wordpress Blog.

Not only this Custom Search Engine be incorporated in Wordpress Blogs, you can easily insert it to any Website by suitable editing the HTML/PHP file.

Related Reading: Inserting AdSense for Search in Wordpress Blog by Removing Wordpress Sidebar, Adding Advertisement Code in between First and Second Post in Wordpress and Adding Advertisement between Wordpress Header and Posts

Liked this Post? Get free Quality Updates in your Inbox. Please Enter your E-mail Address Below OR For More Subscription Options Click Here

Sharing is Caring
  • Facebook
  • Twitter
  • del.icio.us
  • StumbleUpon
  • Google Bookmarks
  • Reddit
  • FriendFeed
  • blogmarks
  • Digg

Related posts:

  1. Insert Ads between Wordpress Header, Posts & Sidebar
  2. How to Apply for Guruji Ads Network?
  3. Now Read Out a Blog in Robots.txt File!
  4. Wordpress XML and XHTML Sitemap
  5. Akismet is MUST for Every Wordpress Blog!
  6. Hide/Mask Affiliate Links in your Blog/Website

September 17th, 2009 Google, Web, Wordpress

Custom Search Engine, Google, Search, Wordpress

2 Responses to “Enhance your Wordpress 404 Page with Google Search”

  1. Adrian on September 17, 2009 at 8:41 pm

    Oh heck that this does not work on WordPress.com blogs!

  2. mrintech on September 17, 2009 at 11:08 pm

    Yes! That’s one of the Downside of Wordpress.com Blogs

    Mrintech Recommends Hostgator Webhosting

Comments are closed.

    Translate
    Subscribe

    Subscribe to Mrintech

    Advertisement
    We Recommend:

    Mrintech Recommends Hostgator Webhosting

    Sites We Like
    • A Quizzical Reality…
    • BT Elements
    • iTech7
    • Leased Line
    • MPLS
    • Phoenix: Anirudh's Blog
    • SDSL
    • What's On My PC
Home | About | Contact | Advertise | Web Hosting | Connect With Us | Sitemap | Disclaimer | Privacy
Copyright © MrinTech. Performancing's Treasure Theme by Randa Clay. Proudly powered by WordPress