How to redirect comment form?
$nid = 1; // lets pretend the node ID you want to redirect is 1.

$url = \Drupal\Core\Url::fromRoute('entity.node.canonical', ['node' =&gt; $nid]);
$form_state-&gt;setRedirectUrl($url);