From 7cd1d80619dfeae38fe46b8d041844fe583d30d3 Mon Sep 17 00:00:00 2001 From: Greg Roach Date: Thu, 20 Feb 2014 11:14:56 +0000 Subject: #106 - SEO tweaks to home page --- index.php | 1 + robots-example.txt | 2 ++ 2 files changed, 3 insertions(+) diff --git a/index.php b/index.php index 939a29e0c4..7cc0221432 100644 --- a/index.php +++ b/index.php @@ -86,6 +86,7 @@ if ($ctype=='user') { $controller ->setPageTitle($ctype=='user' ? WT_I18N::translate('My page') : WT_TREE_TITLE) ->setMetaRobots('index,follow') + ->setCanonicalUrl(WT_SCRIPT_NAME . '?ctype=' . $ctype . '&ged=' . WT_GEDCOM) ->pageHeader() // By default jQuery modifies AJAX URLs to disable caching, causing JS libraries to be loaded many times. ->addInlineJavascript('jQuery.ajaxSetup({cache:true});'); diff --git a/robots-example.txt b/robots-example.txt index eb8ea7bee0..d7306cdcf8 100644 --- a/robots-example.txt +++ b/robots-example.txt @@ -23,6 +23,7 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # Well-behaved robots understand "Allow" directives. +# Google (plus some others?) understands the "$" pattern match User-Agent: bingbot # Bing User-Agent: Googlebot # Google User-Agent: ia_archiver # Internet Archive "wayback" machine @@ -44,6 +45,7 @@ Allow: /repo.php Allow: /site-offline.php Allow: /site-unavailable.php Allow: /source.php +Allow: /$ Disallow: / # Disallow all other robots -- cgit v1.3