diff --git a/lib/middleman-search/extension.rb b/lib/middleman-search/extension.rb
index <HASH>..<HASH> 100644
--- a/lib/middleman-search/extension.rb
+++ b/lib/middleman-search/extension.rb
@@ -26,7 +26,7 @@ module Middleman
       end
 
       def search_index_path
-        app.config[:http_prefix] + sitemap.find_resource_by_path(extensions[:search].options[:index_path]).destination_path
+        (config || app.config)[:http_prefix] + sitemap.find_resource_by_path(extensions[:search].options[:index_path]).destination_path
       end
     end
   end
Fix: search_index_path works in MM3

`app` is not defined for helpers in MM3 - but `config` is