In hook_node_insert drupal_goto with alias name not working
I checked the drupal_goto and found out that you must provide the path for parameter. You can't use alias for drupal_goto. So i think you can solve your problem like that:


While you create node. You will also create the alias for that node. The reference for create the alias for node here. In your code just normally redirect like that

drupal_goto('node/'.$node-&gt;nid);

After that you will install Global redirect module. This module will have responsibility to redirect your node/nid to your node's alias


[Updated]

Can you try to generate the alias by using the Pathauto. So can you put these code in hook_insert()

function yourmodule_node_insert($node){
  module_load_include('inc', 'pathauto');
  pathauto_cleanstring($node-&gt;title);
  $node-&gt;path = array('pathauto' =&gt; TRUE );
  drupal_goto('node/'.$node-&gt;nid);
}