Redirect to webform from controller and back to custom form I have a use case where I'm creating a custom form, but for business reasons, I need to obtain customer information in a separate webform prior to granting access to my custom form. So my workflow needs to be as follows:

Customer attempts to access form at /my-custom-form url
Customer is redirected to customer information webform at /customer-information-form
Customer fills out customer info form and submits it.
On submission, customer is redirected to /my-custom-form url.

My thought was to use a controller for the /my-custom-form url, and just do a redirect to the webform, and then when the webform has been submitted, redirect back to the form, having to note that the webform is submitted. However, what I'm having problems finding is how to redirect using an internal URL using the Drupal\Core\Url class. In order to use the redirect() method that is included in the ControllerBase class, it has to be a defined route name (e.g. my_module.my_custom_route. If I try something like this:
$url_object = \Drupal::service('path.validator') -&gt;getUrlIfValid('/customer-information-form');
$route_name = $url_object-&gt;getRouteName();
$this-&gt;redirect($route_name);

$route_name = entity.webform.canonical, which throws an error, since that's a generic route name.
So my question is, how do I redirect my user to my webform using an internal path, especially when it is just a generic webform?
UPDATE: So the ControllerBase class has a redirect() method that from what I've seen, should allow me to redirect. However, when I use this code in my controller function:
$url_object = \Drupal::service('path.validator')-&gt;getUrlIfValid('/my-custom-form');
$route_name = $url_object-&gt;getRouteName();
$route_params = $url_object-&gt;getRouteParameters();
$this-&gt;redirect($route_name, $route_params);

but when I run it, I get an error that my controller must return a response. If I add some simple markup like so
return [
  '#type' =&gt; 'markup',
  '#markup' =&gt; $this-&gt;t('Hello, World!'),
];

Then I get that markup instead of the redirect happening.  What is the purpose of that redirect() method if it doesn't redirect?
What is the purpose of that redirect() method if it doesn't redirect?

You find this method in both, controller and form:
ControllerBase::redirect()
FormBase::redirect()
It creates a redirect response and you return it if a certain condition is met:
if (...) {
   return $this-&gt;redirect($route_name);
}

Example: https://drupal.stackexchange.com/a/277596/47547