Preventing Duplicates on Google

Posted by abel on Pro Webmasters See other posts from Pro Webmasters or by abel
Published on 2011-02-02T13:03:59Z Indexed on 2011/02/02 15:34 UTC
Read the original article Hit count: 361

Filed under:
|

I am currently using a rewrite rule to enable access to .php pages, without using the php extension. However to prevent old links from breaking, the pages can still be accessed via links containing the .php extension too.

For eg.

domain.com/page.php can now be accessed at domain.com/page

All the links on the website now use domain.com/page type links within the site. However older incoming links will still link to the .php pages, meaning Google will index both pages and mark them as duplicate.

I have two plans to remedy the situation.

  1. Use a php 301 redirect: When a page is accessed with the .php extension, I can redirect each page individually using a 301 redirect using php

  2. Using Canonical: Place a canonical tag on each page, pointing to the ".php" less version

My Question:
Are both methods equally efficacious in preventing Google from indexing my ".php" pages?
Which method should be preferred, by convention or otherwise?

© Pro Webmasters or respective owner

Related posts about seo

Related posts about duplicate-content