Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I am running my website with CodeIgniter framework. I have setup cdn using cname cdn.domain.com which is being indexed by Google. And the content of the both domain.com and cdn.domain.com is having same content and is being considered as duplicated resulting ranking issue. I tried contacting the developer and he was not able to help. I hope there is some way to avoid such issue.

share|improve this question
    
just a quick note for a simple solution: open up a GWT account (Google Webmaster Tools) and verify both domains within the system. After, you may specify to Google, that only one domain should be listed as the default domain. that should make your problem go away. –  DKOATED Jan 12 '13 at 11:53
add comment

2 Answers

Domain and URL duplicates are easy to avoid with using a header method called rel canonical it was invented by the search engines to avoid duplicate content ending up within the indexing and ultimately effecting your rankings.

As DKOATED suggested you can add the CDN to the Webmaster Tools as remove these URLS but this will likely resolve in it being reindexed after you have removed them.

By using rel canonical on your pages you are telling the search engines the MASTER page so say if example you have a page that is labeled Page B and is accisble many ways such as:

domainname.com/?=pageB/ domainname.com/PageB/ domainname.com/catagory/media/pageB/ cdn.domain.com/PageB/

By using

<head>
<link rel="canonical" href="http://domainname.com/PageB/" />
</head>

This would tell the search engines that /PageB/ is the master page and no other pages which are accessible on other URLS will be indexed by the search engine. This is by far the best method and was introduced to remove the problem your having. Blogs such as Wordpress have many pages that are accessible by author, tags, and so forth making lots of duplicates as well as Joomla does too and for this reason this tag came along and solved this problem.

If your using a CMS such as Wordpress I recommend Yoast SEO which will do this for and if its Joomla then AceSEF or SH404SEF. If your using something else or a static site then your need to manually put them in or look for something automated to do the process for you.

Once you have the canonical set your best of manually removing the ones from the webmaster tools once you have verified that domain, simply upload the .html verify file to the CDN to do this, Google provide this information how to do.

You can use robots.txt on the CDN but you want images to index so if this is not a direct mirror this could be harmful so only block the htmls/php etc.

share|improve this answer
    
canonicalization is the best option but I am using CodeIgniter which has most of the pages static. Is there any way to do it using if else statement? –  FlourishDNA Jan 13 '13 at 8:58
    
Quick Google search reveals ellislab.com/forums/viewthread/131508 for SEO modules for CodeIgniter which could be ideal. I've edited my answer with additional information as well. –  bybe Jan 13 '13 at 9:37
add comment

if you do not want to indexing by google, you must put : Disallow: / to your cdn directory.

or you can remove google index via google webmaster tools.

but firstly add your cdn domain to google webmaster tools.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.