diff --git a/config-templates/config.php b/config-templates/config.php
index 02caaad904b3c78e10eacfe73f6e5c2060e4d111..fb7a87623c0ec1f20c191ce28ab54b54b830fb60 100644
--- a/config-templates/config.php
+++ b/config-templates/config.php
@@ -808,7 +808,8 @@ $config = [
      * is running in a production environment. This will affect the way resources
      * are used, offering an optimized version when running in production, and an
      * easy-to-debug one when not. Set it to false when you are testing or
-     * developing the software.
+     * developing the software, in which case a banner will be displayed to remind
+     * users that they're dealing with a non-production instance.
      *
      * Defaults to true.
      */
diff --git a/docs/simplesamlphp-authproc.md b/docs/simplesamlphp-authproc.md
index d66762e4bb0487265cb13bed7b220c564d001348..77fd086c96cac4b5ba966c02358b9e1f9ad49305 100644
--- a/docs/simplesamlphp-authproc.md
+++ b/docs/simplesamlphp-authproc.md
@@ -111,7 +111,7 @@ Filters can be added both in `hosted` and `remote` metadata. Here is an example
 		'certificate'		=>	'example.org.crt',
 		'auth'				=>	'feide',
 		'authproc' => [
-			40 => 'preprodwarning:Warning',
+			40 => 'core:TargetedID',
 		],
 	]
 
@@ -143,7 +143,6 @@ The following filters are included in the SimpleSAMLphp distribution:
 - [`core:TargetedID`](./core:authproc_targetedid): Generate the `eduPersonTargetedID` attribute.
 - [`core:WarnShortSSOInterval`](./core:authproc_warnshortssointerval): Give a warning if the user logs into the same SP twice within a few seconds.
 - [`expirycheck:ExpiryDate`](./expirycheck:expirycheck): Block access to accounts that have expired.
-- [`preprodwarning:Warning`](./preprodwarning:warning): Warn the user about accessing a test IdP.
 - [`saml:AttributeNameID`](./saml:nameid): Generate custom NameID with the value of an attribute.
 - [`saml:AuthnContextClassRef`](./saml:authproc_authncontextclassref): Set the authentication context in the response.
 - [`saml:ExpectedAuthnContextClassRef`](./saml:authproc_expectedauthncontextclassref): Verify the user's authentication context.
diff --git a/locales/en/LC_MESSAGES/messages.po b/locales/en/LC_MESSAGES/messages.po
index 33e9ac937b4d56e06b1924f003da7d202ebac87d..ab8f8396c6cf2ea7ce28a20acaf4f523ddf63a06 100644
--- a/locales/en/LC_MESSAGES/messages.po
+++ b/locales/en/LC_MESSAGES/messages.po
@@ -1742,3 +1742,9 @@ msgstr ""
 "provide a SAML Authentication Response. Please note that this endpoint is"
 " not intended to be accessed directly."
 
+msgid "pre-production-warning"
+msgstr ""
+"You are now accessing a pre-production system. This authentication setup "
+"is for testing and pre-production verification only. If someone sent you "
+"a link that pointed you here, and you are not a tester you "
+"probably got the wrong link, and should not be here."
diff --git a/templates/base.twig b/templates/base.twig
index 316291ce814315e30f85d10ded6954c03268872f..d7fdd353353fc7c79c4d0a4577be64b82d3660e5 100644
--- a/templates/base.twig
+++ b/templates/base.twig
@@ -21,6 +21,9 @@
 {% block header %}{% include "_header.twig" %}{% endblock %}
         <div id="content">
             <div class="wrap">
+            {% if not isProduction -%}
+            <div class="message-box warning">{{ 'pre-production-warning' | trans }}</div>
+            {% endif -%}
                 {% block contentwrapper -%}
                     {% block content %}{% endblock -%}
                 {% endblock %}
diff --git a/templates/includes/header.php b/templates/includes/header.php
index c84dcb942c7d587d7fb1452ad7ee00301f193d0d..6ddad9279fe0ffe99305c0dcde30b288a20bbd16 100644
--- a/templates/includes/header.php
+++ b/templates/includes/header.php
@@ -206,3 +206,7 @@ if (!empty($this->data['htmlinject']['htmlContentPre'])) {
         echo $c;
     }
 }
+$config = \SimpleSAML\Configuration::getInstance();
+if(! $config->getBoolean('production', true)) {
+  echo '<div class="caution">' . $this->t('{preprodwarning:warning:warning}'). '</div>';
+}
diff --git a/www/assets/css/src/default.css b/www/assets/css/src/default.css
index f1721e22eb9089b4e717a7177bfd0c38dc3d94f7..600a602f7756d65523aa5992869ca20a84998723 100644
--- a/www/assets/css/src/default.css
+++ b/www/assets/css/src/default.css
@@ -360,6 +360,10 @@ CONTENT
     background-color: #f7e4e1;
     border-left-color: #cc4b37;
 }
+.message-box.warning {
+    background-color: #fffdbf;
+    border-left-color: #f9f56b;
+}
 .message-box.success {
     background-color: #daf7e6;
     border-left-color: #46cc48;