diff --git a/sphinx/templates/layout.html b/sphinx/templates/layout.html
index a353aaf87..570adcdba 100644
--- a/sphinx/templates/layout.html
+++ b/sphinx/templates/layout.html
@@ -118,7 +118,7 @@
{%- endif %}
- {%- if use_opensearch %}
+ {%- if use_opensearch and builder != 'htmlhelp' %}