About Rutgers University "Websites" Search

Rutgers University uses Google Custom Search Engine to help its visitors find Rutgers websites and online resources in the most efficient way.

Important Message: Google has deprecated support for legacy Rutgers search based on Google University Search.

Please move your search implementation to Google Custom Search Engine or use the methods outlined below to provide search for your Rutgers-based website.

Searching all of Rutgers using RUS

To help your visitors search through all university web pages simply provide a link to the Rutgers University "Websites" search page. The location of Rutgers "Websites" search is http://search.rutgers.edu/web.

Following is a code sample for creating a link.

<a href="http://search.rutgers.edu/web">Search Rutgers</a>

Try it yourself. Search Rutgers

If you prefer to display a search form that will forward your visitors' queries to RUS, please cut and paste the following code snippet into your web pages.

<form method="GET" action="http://search.rutgers.edu/web">
   <input type="text" name="q" size="35">
   <input type="submit" value="Search Rutgers">
</form>

The result of above code follows. Try it out below.

To force RUS searches into a separate browser tab or window, simply add target="RUS" title="Opens in a new tab or window" to the <form> or anchor <a> tags.

Alternatively, you may use JavaScript to programmatically pass the search query to RUS by dynamically building a link appended with the q parameter and its corresponding value. The value is captured in a form field and transferred as a query parameter/value pair on the link. Please make sure to convert any spaces in a multi-word query term to +. An example of what this link may look like follows:

http://search.rutgers.edu/web?q=undergraduate+admissions+application
Where "undergraduate admissions application" is your visitor's search term or keyword.

Shortcuts to desired search results pages may also be embedded in web pages. Following shows an example of an embedded link.

Find out more about <a href="http://search.rutgers.edu/web?q=undergraduate+admissions+application" target="RUS" title="Opens in a new tab or window">undergraduate admissions application</a>.
Clicking on this link would show the results page for an "undergraduate admissions application" search. You may test it out below...
Find out more about undergraduate admissions application.

Searching within your Rutgers website using RUS

To limit a search to a specific Rutgers website or sub-domain (e.g. eden.rutgers.edu), a "site:" query modifier followed by a domain name needs to be appended to the q parameter. The resulting URL should look like the following:

http://search.rutgers.edu/web?q=admissions+application+site:admissions.rutgers.edu

Please remember to change the domain name, admissions.rutgers.edu - bold red - in the URL above, to whatever is appropriate to your application.

A little bit of scripting (JavaScript) is necessary to get to this point. Essentially, you'll want to append the "site:domain.rutgers.edu" query modifier to the query term parameter, "q" upon search form submission. Please see the code example below.

The minimum HTML you'll need:

<form method="GET" action="http://search.rutgers.edu/web" onsubmit="appendDomain('eden.rutgers.edu'); return false;">
   <input type="text" name="q">
   <input type="submit" value="Search">
</form>

The JavaScript you'll need:

<script>
function appendDomain(f,d) 
{

   var q = f.elements['q'].value; // get the query term from search form
   var site = " site:" + d; // build the site query term modifier

   if (q.indexOf(site) == -1) // check if site modifier is not already in query
   {
      var qTemp = q + site; // append site modifier to query
      f.elements['q'].value = qTemp; // replace the query term in input field with one containing the modifier
   }

   f.submit(); // submit the form
}
</script>

Try it below...

The code above will modify the query input by the visitor in the search box by appending "site:domain.rutgers.edu" to it. If you'd prefer this to be less obtrusive, please continue to alternative code sample below.

If you'd like the search results to open up in a new tab or window, add the target="RUS" attribute in your opening <form> tag.

Another way to handle passing the modified query to RUS is shown below. In this case, instead of actually submitting the form, we rewrite the current page's URL in the browser's address field, effectively forwarding the visitor's query to RUS.

<script>
function appendDomain(f,d) 
{

   var q = f.elements['q'].value; // get the query term from search form
   var site = " site:" + d; // build the site query term modifier

   if (q.indexOf(site) == -1) // check if site modifier is not already in query
   {
      q = q + site; // append site modifier to query
      q = q.split(' ').join('+'); // replace spaces with +s
   }

   location.href = "http://search.rutgers.edu/web?q=" + q; // replace current page with site specific query results displayed in RUS

   // comment out the line above and uncomment the two lines below to open search results in a new tab or window
   // var win = window.open("http://search.rutgers.edu/web?q=" + q , 'RUS'); // open search results via RUS in a new tab or window
   // win.focus(); // bring new tab or window to the front

}
</script>

Try it below...