diff --git a/core/includes/pager.inc b/core/includes/pager.inc
index 40d9c01..5cf016e 100644
--- a/core/includes/pager.inc
+++ b/core/includes/pager.inc
@@ -139,6 +139,46 @@ function pager_get_query_parameters() {
   return $query;
 }
 
+
+/**
+ * Preprocessor for theme_pager()
+ *
+ * Adds links to <head> to indicate the urls for the page before and the page
+ * after the current page. This indicates to search engines the relationship
+ * between component URLs in a paginated series.
+ */
+function template_preprocess_pager(&$variables) {
+
+  $element = $variables['element'];
+  $parameters = $variables['parameters'];
+
+  global $pager_page_array, $pager_total;
+
+  // Get the current page
+  $pager_current = $pager_page_array[$element] + 1;
+
+  // If we're on the first page, there's no prev so skip it
+  if ($pager_current != 0) {
+    // Get the next page and build the query for the url
+    $page_new = pager_load_array($pager_page_array[$element] + 1, $element, $pager_page_array);
+    $query = pager_build_query($page_new, $element, $parameters);
+
+    // Build the url and add it to head
+    $next_href = url(current_path(), array('query' => $query));
+    drupal_add_html_head_link(array('rel' => 'next', 'href' => $next_href));
+  }
+  // If we're on the last page there's no next so skip it
+  if ($pager_current != $pager_total[$element]) {
+    // Get the previous page and build the query for the url
+    $page_new = pager_load_array($pager_page_array[$element] - 1, $element, $pager_page_array);
+    $query = pager_build_query($page_new, $element, $parameters);
+
+    // Build the url and add it to head
+    $prev_href = url(current_path(), array('query' => $query));
+    drupal_add_html_head_link(array('rel' => 'prev', 'href' => $prev_href));
+  }
+}
+
 /**
  * Returns HTML for a query pager.
  *
@@ -297,7 +337,7 @@ function theme_pager_first($variables) {
 
   // If we are anywhere but the first page
   if ($pager_page_array[$element] > 0) {
-    $output = theme('pager_link', array('text' => $text, 'page_new' => pager_load_array(0, $element, $pager_page_array), 'element' => $element, 'parameters' => $parameters, 'attributes' => array('rel' => 'first')));
+    $output = theme('pager_link', array('text' => $text, 'page_new' => pager_load_array(0, $element, $pager_page_array), 'element' => $element, 'parameters' => $parameters));
   }
 
   return $output;
@@ -335,7 +375,7 @@ function theme_pager_previous($variables) {
     }
     // The previous page is not the first page.
     else {
-      $output = theme('pager_link', array('text' => $text, 'page_new' => $page_new, 'element' => $element, 'parameters' => $parameters, 'attributes' => array('rel' => 'prev')));
+      $output = theme('pager_link', array('text' => $text, 'page_new' => $page_new, 'element' => $element, 'parameters' => $parameters));
     }
   }
 
@@ -373,7 +413,7 @@ function theme_pager_next($variables) {
     }
     // The next page is not the last page.
     else {
-      $output = theme('pager_link', array('text' => $text, 'page_new' => $page_new, 'element' => $element, 'parameters' => $parameters, 'attributes' => array('rel' => 'next')));
+      $output = theme('pager_link', array('text' => $text, 'page_new' => $page_new, 'element' => $element, 'parameters' => $parameters));
     }
   }
 
@@ -402,7 +442,7 @@ function theme_pager_last($variables) {
 
   // If we are anywhere but the last page
   if ($pager_page_array[$element] < ($pager_total[$element] - 1)) {
-    $output = theme('pager_link', array('text' => $text, 'page_new' => pager_load_array($pager_total[$element] - 1, $element, $pager_page_array), 'element' => $element, 'parameters' => $parameters, 'attributes' => array('rel' => 'last')));
+    $output = theme('pager_link', array('text' => $text, 'page_new' => pager_load_array($pager_total[$element] - 1, $element, $pager_page_array), 'element' => $element, 'parameters' => $parameters));
   }
 
   return $output;
@@ -439,17 +479,8 @@ function theme_pager_link($variables) {
   $attributes = $variables['attributes'];
 
   $page = isset($_GET['page']) ? $_GET['page'] : '';
-  if ($new_page = implode(',', pager_load_array($page_new[$element], $element, explode(',', $page)))) {
-    $parameters['page'] = $new_page;
-  }
 
-  $query = array();
-  if (count($parameters)) {
-    $query = drupal_get_query_parameters($parameters, array());
-  }
-  if ($query_pager = pager_get_query_parameters()) {
-    $query = array_merge($query, $query_pager);
-  }
+  $query = pager_build_query($page_new, $element, $parameters);
 
   // Set each pager link title
   if (!isset($attributes['title'])) {
@@ -484,6 +515,27 @@ function theme_pager_link($variables) {
  */
 
 /**
+ * Helper Function
+ *
+ * Builds a pager query for a pager link. Returns An associative array of query
+ * string parameters to append to the pager link.
+ */
+function pager_build_query($page_new, $element, $parameters) {
+  $page = isset($_GET['page']) ? $_GET['page'] : '';
+  if ($new_page = implode(',', pager_load_array($page_new[$element], $element, explode(',', $page)))) {
+    $parameters['page'] = $new_page;
+  }
+  $query = array();
+  if (count($parameters)) {
+    $query = drupal_get_query_parameters($parameters, array());
+  }
+  if ($query_pager = pager_get_query_parameters()) {
+    $query = array_merge($query, $query_pager);
+  }
+  return $query;
+}
+
+/**
  * Helper function
  *
  * Copies $old_array to $new_array and sets $new_array[$element] = $value
