Question

Google webmasters tool is showing me 26 duplicate pages because you can access the page in both ways: /crossMaker.php?jsonID=103 /crossMaker?jsonID=103

In my htaccess file i made it possible not to include the php extension but probably somewhere in the code i linked to the filename with the suffix so google crawled it.

What can i do so that google will forget about the file with the extension? use 301 redirect? if so how do i do that?

Was it helpful?

Solution

Just use canoncial URLs. It's much easier and the proper way to handle this.

For example, put this at the top of the page:

<link rel="canonical" href="http://www.example.com/crossMaker?jsonID=103" />

You can create these dynamically so it should be easy for you to implement.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top