Canonical Links Issue - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Canonical Links Issue (/showthread.php?tid=56689) |
Canonical Links Issue - El Forum - 01-11-2013 [eluser]Unknown[/eluser] I have setup cdn for the website and now I am hacing canonical links issues. cdn.domain.com is being indexed which contains content of the main domain so the Google is considering it as duplicate content. I would like to place a canonical link element on the header.php so it shows up on every page but I am having difficulties as I am very new with codeignitor. To make it more clear I have mentione the codes below for getting links. Home Page: Code: <?php echo base_url();?> Other static pages like about, contact, privacy policy, etc.: Code: <?php echo base_url();?>info/<?php echo $footer_menu_row->page_seo; ?>.html For dynamic pages (Similar to blog posts): Code: <?php echo base_url().'view/'.$row->wall_id.'/'.friendlyURL($row->wall_name).'.html';?> Thanks Canonical Links Issue - El Forum - 01-11-2013 [eluser]boltsabre[/eluser] Hmmm, I cannot see any "canonical" related html at all... As to the best of my knowledge canonical links are strictly one domain, not cross domain, directives. I could be wrong, but I think you'll have to look for another option. Canonical Links Issue - El Forum - 01-11-2013 [eluser]Unknown[/eluser] @boltsabre I just want to echo out actual url of the current page. Example: When someone visits domain.com/info/about-us.php then in the header it should have Code: <link rel="canonical" href="http://domain.com/info/about-us.php" /> |