• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Canonical Links Issue

#1
[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

#2
[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.

#3
[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" />
so Google does not consider it as duplicate when google finds cdn version http://cdn.domain.com/info/about-us.php


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.