SHARE
Facebook X Pinterest WhatsApp

Beginning HTML at HTML Goodies

Written By
thumbnail
Joe Burns
Joe Burns
Jan 4, 2005

Use these to jump around or read it all…


[Set It Up
[
Search with AltaVista]
[Search with HotBot]


One of the most asked questions is “How do I set it up so people can search my site?” I offered some answers in my database tutorial, including a JavaScript-driven search.

Well, now a little-known method is starting to be used more and more and I’m getting e-mail about it so a tutorial is in order. Here, you’ll learn how to use the AltaVista and HotBot search engines to search your site.



Set It Up

Yes, you heard right. You can use the honest-to-goodness AltaVista or HotBot search engines as your very own site search engine. Here’s how it works. You first submit all of your pages to one search engine or the other (or both if you want to set up both searches, but that seems like overkill to me). You’ll need to go to the search engine itself and follow their steps for submitting your pages.


     I mean submit them all, one right after the other. It may take a few days to get your sites into the system so they can be searched, but that’s not a concern. Once your pages are in the search engine, you’ll use the code below to set up a search from your page that limits AltaVista or HotBot to look only at pages listed in your domain or ISP account. Thus… only your pages will be searched. Cool, huh?


     The only real downfall is that when the results are posted, the user is taken off of your site and to the AltaVista or HotBot search engine. But then, of course, all the links that display point back to your site. It’s a small price to pay.


     Plus, since your pages are all registered with the search engine, they also have the ability to pop up during any normal search. Two birds, one stone.



Search with AltaVista

I’ll do the AltaVista code first. I’ve known the HotBot code for a while. It’s in the HTML Goodies book. I knew AltaVista had a method, but didn’t know the code until Denis Payne

from the Impington Parish Council

sent me what he had done. Thank you, Denis, you’re a gentleman.


Here’s the code:

To apply it to your site, you need to make one change. This line:

<INPUT TYPE=”HIDDEN” name=q cols=0 rows=0 wrap=virtual
VALUE=”url:http://www.domain.com/your/site/“>

That denotes the domain and directory to be searched. For instance, your site is http://www.dogbreath.com/users/~joe. You would set up the line to read:

<INPUT TYPE=”HIDDEN” name=q cols=0 rows=0 wrap=virtual
VALUE=”url:http://www.dogbreath.com/users/~joe/“>

Notice the slash following the last directory, at the end of the URL. That tells AltaVista to search everything within http://www.dogbreath.com/users/~joe. You can also shortcut the typing by simply writing */users/~joe/ replacing the domain with a star. Either way will work.

     If you have a domain unto itself then put in the domain only ending it with a slash; it will search anything within the domain.

     One more thing: Notice how the code has a Thank You link back to AltaVista? Leave that in there. They’re nice enough to allow you to search using their site, offer a link back to help increase their traffic.



Search with HotBot

The code is very similar. It looks like this.

Again, there’s just the one line that needs to be altered:


<INPUT TYPE=”HIDDEN” NAME=”domain” VALUE=”www.domain.com/users/joe/“>

Note there’s no leading http://. Other than that, the same rules apply as to putting it in your domain. Again, there’s a courtesy link back to HotBot provided. Keep it.


That’s That

This is a great method for getting smaller sites into the search business. Good luck and happy searching!

 


Enjoy!

 


[Set It Up]

[Search with AltaVista]
[Search with HotBot]

 

Back to the Goodies Home Page



Recommended for you...

Guide to International SEO
Project Management Tools for Web Developers
Enrique Corrales
Jun 20, 2022
Five Essential HTML5 Editors
HTML Goodies Logo

The original home of HTML tutorials. HTMLGoodies is a website dedicated to publishing tutorials that cover every aspect of being a web developer. We cover programming and web development tutorials on languages and technologies such as HTML, JavaScript, and CSS. In addition, our articles cover web frameworks like Angular and React.JS, as well as popular Content Management Systems (CMS) that include WordPress, Drupal, and Joomla. Website development platforms like Shopify, Squarespace, and Wix are also featured. Topics related to solid web design and Internet Marketing also find a home on HTMLGoodies, as we discuss UX/UI Design, Search Engine Optimization (SEO), and web dev best practices.

Property of TechnologyAdvice. © 2025 TechnologyAdvice. All Rights Reserved

Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.