diff --git a/docs/reference/themes/mongodb/static/js/scripts.js b/docs/reference/themes/mongodb/static/js/scripts.js
index <HASH>..<HASH> 100644
--- a/docs/reference/themes/mongodb/static/js/scripts.js
+++ b/docs/reference/themes/mongodb/static/js/scripts.js
@@ -45,7 +45,7 @@ jQuery(document).ready(function() {
     });
     jQuery('.body table').addClass('table').addClass('table-striped');
     var siteInput = $('#search input[name="site"]');
-    if (siteInput.val().substring(0, 4) != "http") {
+    if (siteInput.val().indexOf(window.location.hostname) < 0) {
         siteInput.attr("value", window.location.hostname + siteInput.val());
     }
     jQuery("#search form").submit(function() {
Docs: JS fix for search form (#<I>)

As the protocol is not part of the window.location.hostname ensure if

the browser caches the form field that the hostname isn't duplicated on

refresh.



JAVA-<I>