diff --git a/core/includes/install.core.inc b/core/includes/install.core.inc
index 8f8ba759f4..8dae452c2b 100644
--- a/core/includes/install.core.inc
+++ b/core/includes/install.core.inc
@@ -553,6 +553,7 @@ function install_begin_request($class_loader, &$install_state) {
  *   HTML output from the last completed task.
  */
 function install_run_tasks(&$install_state, callable $callback = NULL) {
+  drupal_check_cookie();
   do {
     // Obtain a list of tasks to perform. The list of tasks itself can be
     // dynamic (e.g., some might be defined by the installation profile,
@@ -2461,6 +2462,19 @@ function install_config_revert_install_changes() {
   }
 }
 
+/**
+ * Check to see that the client installing this site has cookies enabled.
+ */
+function drupal_check_cookie() {
+  setcookie('drupal_install_check', TRUE, time() + 31536000, '/');
+  if (!isset($_COOKIE['drupal_install_check'])) {
+    $domain = ini_get('session.cookie_domain') ? ltrim(ini_get('session.cookie_domain'), '.') : $_SERVER['HTTP_HOST'];
+    $message = t('It seems your browser does not accept cookies. To set up this site, you need to accept cookies from this domain %domain.', ['%domain' => $domain]);
+    $messenger = \Drupal::messenger();
+    $messenger->addMessage($message);
+  }
+}
+
 /**
  * Creates a batch to process config translations after installing from config.
  *
