diff --git a/cabal-install/Distribution/Client/Setup.hs b/cabal-install/Distribution/Client/Setup.hs
index 0b0c70dfd7a36421785c14e7793811fe18e774a2..d48148004ab86fc1a9df988e1823f6a954a151e5 100644
--- a/cabal-install/Distribution/Client/Setup.hs
+++ b/cabal-install/Distribution/Client/Setup.hs
@@ -1011,7 +1011,8 @@ defaultInstallFlags = InstallFlags {
     installRunTests        = mempty
   }
   where
-    docIndexFile = toPathTemplate ("$datadir" </> "doc" </> "index.html")
+    docIndexFile = toPathTemplate ("$datadir" </> "doc"
+                                   </> "$arch-$os-$compiler" </> "index.html")
 
 allowNewerParser :: ReadE AllowNewer
 allowNewerParser = ReadE $ \s ->