skip to Main Content
Drupal 7 Handle Redirect URL After User Registerd.

Drupal 7 handle redirect URL after user registerd.

How to handle the redirect URL after user completed the registration process on Drupal7 Custom module. After completing the registration process by default Drupal redirect user to home page. Let’s see how we can handle the redirect URL after complete the registration process.

We can handle registration form redirect URL using the module. I hope you create your own module if not please follow this tutorial.

Let’s create the hook for handle the redirect URL of the registration form.

function thecodingstuff_form_alter(&$form, &$form_state, $form_id) {
    if ($form_id == 'user_register_form') {
        $form['#submit'][] = 'register_form_submit_handler';

function register_form_submit_handler(&$form, &$form_state) {
    $form_state['redirect'] = 'product';

Just add above method to your module then clear the Drupal cache if enable.

After complete, the registration process user will be redirected to “product” page as per my code. you can change the redirect URL as you want.

If you face any issue after using this hook write the comment below.


I am a web designer and developer part-time blogger. Write something on some free time. Find my every day thought here :)

Leave a Reply

Your email address will not be published. Required fields are marked *

Back To Top