diff --git a/core/includes/bootstrap.inc b/core/includes/bootstrap.inc
index fdcb01b..ef28941 100644
--- a/core/includes/bootstrap.inc
+++ b/core/includes/bootstrap.inc
@@ -2590,12 +2590,14 @@ function drupal_maintenance_theme() {
  * accounted for in this function.
  */
 function drupal_fast_404() {
-  $exclude_paths = variable_get('404_fast_paths_exclude', FALSE);
+  $config = config('system.fast_404');
+
+  $exclude_paths = $config->get('exclude_paths');
   if ($exclude_paths && !preg_match($exclude_paths, request_path())) {
-    $fast_paths = variable_get('404_fast_paths', FALSE);
+    $fast_paths = $config->get('paths');
     if ($fast_paths && preg_match($fast_paths, request_path())) {
       drupal_add_http_header('Status', '404 Not Found');
-      $fast_404_html = variable_get('404_fast_html', '<!DOCTYPE html><html><head><title>404 Not Found</title></head><body><h1>Not Found</h1><p>The requested URL "@path" was not found on this server.</p></body></html>');
+      $fast_404_html = $config->get('html');
       // Replace @path in the variable with the page path.
       print strtr($fast_404_html, array('@path' => check_plain(request_uri())));
       exit;
diff --git a/core/modules/system/config/system.fast_404.yml b/core/modules/system/config/system.fast_404.yml
new file mode 100644
index 0000000..9b06a4f
--- /dev/null
+++ b/core/modules/system/config/system.fast_404.yml
@@ -0,0 +1,3 @@
+paths: '/\.(?:txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'
+exclude_paths: '/\/(?:styles)\//'
+html: '<!DOCTYPE html><html><head><title>404 Not Found</title></head><body><h1>Not Found</h1><p>The requested URL "@path" was not found on this server.</p></body></html>'
diff --git a/core/modules/system/system.install b/core/modules/system/system.install
index 9026310..4364a20 100644
--- a/core/modules/system/system.install
+++ b/core/modules/system/system.install
@@ -2186,6 +2186,19 @@ function system_update_8030() {
 }
 
 /**
+ * Moves system fast 404 settings from variable to config.
+ *
+ * @ingroup config_upgrade
+ */
+function system_update_8031() {
+  update_variables_to_config('system.fast_404', array(
+    '404_fast_html' => 'html',
+    '404_fast_paths' => 'paths',
+    '404_fast_paths_exclude' => 'exclude_paths',
+  ));
+}
+
+/**
  * @} End of "defgroup updates-7.x-to-8.x".
  * The next series of updates should start at 9000.
  */
diff --git a/sites/default/default.settings.php b/sites/default/default.settings.php
index 9b1c7ce..8dd32a6 100755
--- a/sites/default/default.settings.php
+++ b/sites/default/default.settings.php
@@ -511,11 +511,11 @@
  *   any aliases ending in htm or html you can add '|s?html?' to the expression.
  * - 404_fast_html: The html to return for simple 404 pages.
  *
- * Add leading hash signs if you would like to disable this functionality.
+ * Remove the leading hash signs if you would like to enable this functionality.
  */
-$conf['404_fast_paths_exclude'] = '/\/(?:styles)\//';
-$conf['404_fast_paths'] = '/\.(?:txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i';
-$conf['404_fast_html'] = '<!DOCTYPE html><html><head><title>404 Not Found</title></head><body><h1>Not Found</h1><p>The requested URL "@path" was not found on this server.</p></body></html>';
+# $conf['system.fast_404']['exclude_paths'] = '/\/(?:styles)\//';
+# $conf['system.fast_404']['paths'] = '/\.(?:txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i';
+# $conf['system.fast_404']['html'] = '<!DOCTYPE html><html><head><title>404 Not Found</title></head><body><h1>Not Found</h1><p>The requested URL "@path" was not found on this server.</p></body></html>';
 
 /**
  * By default the page request process will return a fast 404 page for missing
