Redirect a form to an external URL
The method that you missed is $form_state-&gt;setResponse(). In combination with a TrustedRedirectResponse object, which exists for security reasons (to prevent users from accidentally being redirected to another site), you can use code similar to the following.

$response = new TrustedRedirectResponse('https://facebook.com');
$form_state-&gt;setResponse($response);