diff --git a/docs/templates/layout.html b/docs/templates/layout.html
index 8a57bff2766cc00c00513482bf9caa06cab8a5cb..a6caa0bc5a113272a14f6736ed72cf183b5b30e0 100644
--- a/docs/templates/layout.html
+++ b/docs/templates/layout.html
@@ -1,2 +1,6 @@
 {% extends "!layout.html" %}
 {% set css_files = css_files + ["_static/customstyle.css"] %}
+
+{# we change the master_doc variable so that links to the index
+   page are to index.html instead of <port>_index.html #}
+{% set master_doc = "index" %}