I'm getting tons of pages indexed in Google that shouldn't be. I don't know why they are being indexed, I don't link to them, but they are.
Here is an example:
When the actual permalink is just:
Instead of showing a 404 error, the permalink with added numbers actually shows the post, but the problem is Google sees this as duplicate content.
All the numbers that are being indexed are like the above example. Has anyone else had this happen before?
Is there some sort of php I can implement to check if those numbers have been added and redirect to the right permalink?
I am using the canonical link, but I want to do more because hundreds of posts are being indexed this way.
Try it on your own wordpress install add a directory with random numbers to the end of a post url and it will show up and not 404 like I think it should.