diff --git a/domain.module b/domain.module
index 8ba8466..4c771ce 100644
--- a/domain.module
+++ b/domain.module
@@ -2750,15 +2750,13 @@ function domain_invalid_domain_requested() {
   // Check to see if this is a node page. These are redirected to a visible page, if possible.
   $node = menu_get_object();
   if (empty($node->nid)) {
-    $item = menu_get_item();
-    $path = $item['href'];
-    if (drupal_is_front_page($item['href'])) {
-      $path = '';
-    }
     $default = domain_default();
     // Log the access attempt.
-    watchdog('domain', 'Invalid domain requested by %user on %domain; redirected to %default.', array('%user' => isset($user->name) ? $user->name : variable_get('anonymous', t('Anonymous')), '%domain' => $_domain['sitename'], '%default' => $default['sitename']), WATCHDOG_WARNING);
-    drupal_goto($default['path'] . drupal_get_path_alias($path));
+    if (!empty($default['domain_id'])) {
+      watchdog('domain', 'Invalid domain requested by %user on %domain; redirected to %default.', array('%user' => isset($user->name) ? $user->name : variable_get('anonymous', t('Anonymous')), '%domain' => $_domain['sitename'], '%default' => $default['sitename']), WATCHDOG_WARNING);
+      domain_goto($default);
+    }
+    return drupal_access_denied();
   }
   // Try to find the proper redirect for a node.
   $path = "node/$node->nid";
