I manage a website with tens of thousands of pages named /view.php?id=1234
and so on. Because we wanted it to be more SEO-friendly, a 301 Moved Permanently
redirection of each one of them to /view/name-of-the-page-1234/
was created.
This was about 5 years ago, and everything went fine. But recently thousands of pages have been reappering in Google with the old view.php
URL! So I have about 20,000 results in common between the redirected and the unredirected URLs, which I am guessing will be sooner or later penalized for duplicated content.
I have been told about disallowing view.php
in robots.txt
, but I think that wouldn't be a good idea since Google would stop crawling redirections completely.
How could I stop this duplicate content from appearing in searches and avoid being penalized?