OT How to install a Google search on an individual site

Sep 10, 2012 6 Replies

I keep seeing sites that have a Google search box just for that individual site. I've tried searching Google to see how to do it, and even copied code from other sites, without success. It seems that sites with a Google box have to register with Google, but I'm failing miserably to learn how it works.



Any ideas? Thanks.


News :

It's harder than you might think but not that hard really. Start here:

formatting link

I have one on an test site and looking at the code there is no registration code(s) like there are for Google Ads. A quick google shows that they are as keen as ever to harvest contact information for a login and get money out of you. I might have got the code via AdSense but "my browser is no longer supported get Chrome". Boy am I getting to loath Google.

But a google on a line from the code found this:

formatting link
returns something similar to the code I have but mine doesn't lock people out who don't have JavaScript. Still works.

No registration needed.

Search blah:

MBQ

That's OK but AFAICS there's no facility to customise the results page to match your site's design. Which might or might not matter to the OP. It matters to me for the sites I look after, so I use the full CSE, which AFAIK does require registration. Registration is free and hassle- free (no spam).

In message , Man at B&Q writes

That is brilliant. Thank you. Actually, the code is perfect, but the results a little less so, but that is partly the way Google works, and partly the way the site is written. I'll have to make more effort to correctly caption images etc.

Having read a few other answers, for which thanks, the key phrase I missed was custom search, when trying to find the answer myself. Using Google, everything depends on the exact words or phrase input.

My HTML knowledge is extremely basic, but adequate for a hobby site. I'll experiment a little, and see what happens.

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required