Tabrez Ahmed
Tabrez Ahmed

Reputation: 2960

Multiple URLs for the same content in CakePHP

I Just started exploring CakePHP. From what I have observed, In CakePHP, All of the following are the same.

Is this not considered duplicate content by the search engines?

If yes, how to fix this?

Upvotes: 0

Views: 334

Answers (1)

mark
mark

Reputation: 21743

They are only duplicate content if you link to them differently, thus making the different urls visible. Usually, using cake's internal routing you can only get one of those three versions. Always.

But if someone would get hold of the wrong url and does link it from somewhere it might actually be followed by google and indexed wrongly. So yes, there is a possibility.

So

  • use htaccess to prevent the / (or vica versa) and 301 redirect to the other one
  • use canonical tag in your layout to always route to the correctly routed url - not matter what the full url including /index etc might currently look like).

Details and code examples: http://www.dereuromark.de/2012/12/29/cakephp-and-seo/

Upvotes: 3

Related Questions