diff --git a/docs/templates/layout.html b/docs/templates/layout.html
index 8a57bff276..a6caa0bc5a 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 _index.html #}
+{% set master_doc = "index" %}