I am using webform for contact us page.

Once form is successfully submitted, I have redirected it to a thank you page.

But the URL of thank you page keeps adding webform sid, like given below:


I want to hide the sid from URL.

I am using custom redirect URL in form settings.

  • 1
    First of all, to try to figure out a solution - why do you want to remove it?
    – MiSc
    Sep 29, 2016 at 10:54
  • I dont need that Sep 29, 2016 at 11:00
  • 1
    Sid is there to get submission information on confirmation page, drupal.org/node/1616014. as asnwered below better to redirect to custom confirmation page.
    – arpitr
    Sep 29, 2016 at 11:50
  • @arpitr...that is also not working Sep 29, 2016 at 11:57

2 Answers 2


If you Use any of the two then it wont show SID in URL.


enter image description here

  • I used custom url as 'thank-you' but it still showing as www.example.com/thank-you?sid=12345 Sep 29, 2016 at 11:55
  • can you create a URL other than thank-you and check?
    – NTT
    Sep 29, 2016 at 11:58
  • That will not change anything since thank-you isn't a reserved word Sep 29, 2016 at 12:00
  • Thats completly strange, as I tested with both, it doesnt show sid in URL.
    – NTT
    Sep 29, 2016 at 12:02
  • cleared cache as well Sep 29, 2016 at 12:04

No you can not ignore the "sid" from submission confirmation page.

Yes you can create a separate thank you page and redirect to that page.

You can install this modules:

-> rules

-> webform rules

Now add a rule that redirects the user to your URL after a webform submission.

Using hook_form_alter(), and set the override there.

function mymodule_form_alter(&$form, &$form_state, $form_id) {
  if ($form_id == 'my_form') {
     $form['#submit'][] = 'my_submit_handler';

function my_submit_handler(&$form, &$form_state) {
  $form_state['redirect'] = 'home';

Refer Redirect Drupal Webform Submissions

  • I dont want to do custom code Sep 29, 2016 at 12:44
  • 1
    Have you tried webform rules module.
    Sep 29, 2016 at 12:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.