Page 1 of 1

How To Set Up Search Engine Canonical

PostPosted: Mon Mar 30, 2009 10:38 pm
by Zen4Dummies
How To Set Up Search Engine Canonical

(Instructions are based on an install that has the template overrides in place)

First part required is this code:

<!– Begin SE Canonical –>
<link rel=”canonical” href= <?php
$original_url = HTTP_SERVER . $_SERVER[’REQUEST_URI’];
$split_url = explode(’?', $original_url);
$no_querystring_url = $split_url[0];
echo $no_querystring_url; ?> />
<!– End SE Canonical –>

Now you need to install the code.

Simply copy and paste the code posted above into the html_header.php file right after the closing title tag (</title>).

The html_header.php is located in the "common" folder of your custom template .

If you do not already have the html_header.php you can simply copy the html_header.php from the template_default / common folder and place it in your custom template / common folder.

These informative How To's are provided compliments of Zen4Dummies at http://www.zen4dummies.com