Mike Griffiths

CodeIgniter SEO Quick Tip

by Mike on Jun.26, 2011, under General

In your template (assuming you’re using some sort of engine), within the <head>, place this:

<link rel="canonical" href="<?php echo site_url().$this->uri->uri_string();?>" />

It will produce the current full URL of the page the user is viewing, with the correct structure to your segments and subdomain (www.). This will avoid any canonical issues with search engines, as lots of search engines treat example.com/page, www.example.com/page and example.com/page/ as 3 separate pages.

:,

Leave a Reply

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post.