How to perform a redirect to custom page after node save or delete? What I'm trying to do doesn't work, I still get redirected to /node/{id}:

function hook_form_alter(&amp;$form, $form_state, $form_id) {
  $form['actions']['submit']['#submit'][] = 'callback_set_redirect';
}
function callback_set_redirect($form, FormStateInterface $form_state) {
  $form_state-&gt;setRedirect('custom.landing.page');
}
Basically the code will work for submit action alone, but drupal node save form have many actions, I think you would have logged in as admin and trying it, then follow the code below.

if you want this to be work for other actions too, That means login as admin and see the node save button, you will have select option "save and publish" , "save and unpublish". as mentioned

use Drupal\Core\Form\FormStateInterface;

//hook_form_alter
function hook_form_alter(&amp;$form, $form_state, $form_id) {
  foreach (array_keys($form['actions']) as $action) {
    if ($action != 'preview' &amp;&amp; isset($form['actions'][$action]['#type']) &amp;&amp; $form['actions'][$action]['#type'] === 'submit') {
      $form['actions'][$action]['#submit'][] = 'callback_submit';
    }
  }
}


function callback_submit($form, FormStateInterface $form_state) {
  $form_state-&gt;setRedirect('custom.page');
}