diff --git a/changelog.d/11678.doc b/changelog.d/11678.doc
new file mode 100644
index 0000000000000000000000000000000000000000..dff663e78238cfddc237cbd2b1a35a3d2be78134
--- /dev/null
+++ b/changelog.d/11678.doc
@@ -0,0 +1 @@
+Fix the documentation link in newly-generated configuration files.
diff --git a/docs/sample_config.yaml b/docs/sample_config.yaml
index 00dfd2c013128faa572e7bd37bb3e881c35811ff..810a14b07706488c9133d0cf2d99888645e43396 100644
--- a/docs/sample_config.yaml
+++ b/docs/sample_config.yaml
@@ -37,7 +37,7 @@
 
 # Server admins can expand Synapse's functionality with external modules.
 #
-# See https://matrix-org.github.io/synapse/latest/modules.html for more
+# See https://matrix-org.github.io/synapse/latest/modules/index.html for more
 # documentation on how to configure or create custom modules for Synapse.
 #
 modules:
diff --git a/synapse/config/modules.py b/synapse/config/modules.py
index ae0821e5a50445c4aeaadfe777cf0c47d39144ac..85fb05890d7c82c28f01c12fa0872044f83dbdd9 100644
--- a/synapse/config/modules.py
+++ b/synapse/config/modules.py
@@ -37,7 +37,7 @@ class ModulesConfig(Config):
 
             # Server admins can expand Synapse's functionality with external modules.
             #
-            # See https://matrix-org.github.io/synapse/latest/modules.html for more
+            # See https://matrix-org.github.io/synapse/latest/modules/index.html for more
             # documentation on how to configure or create custom modules for Synapse.
             #
             modules: