diff --git a/simpleads.module b/simpleads.module
index 84fff62..ae4fbd7 100644
--- a/simpleads.module
+++ b/simpleads.module
@@ -387,7 +387,7 @@ function _simpleads_redirect($nid) {
           _simpleads_save_click($node->nid);
         }
         $url = _simpleads_validate_url($url);
-        header("Location: " . $url);
+        drupal_add_http_header('Location', $url);
       }
     }
     else {
@@ -554,4 +554,4 @@ function simpleads_cron() {
     $node = node_load($ad->nid);
     _simpleads_activate_deactive_ad($node);
   }
-}
\ No newline at end of file
+}
