Reputation: 17185
I am about to get rid of a few templates on one of my sites. There are many pages under those templates like
city.php?city_id=1
city.php?city_id=2
city.php?city_id=3
...
What is the right way to tell Google that this page does not exist anymore so that it takes that page out of its index?
Thanks!
Upvotes: 1
Views: 160
Reputation: 11
So you create 2 files:
.htaccess
. Then put the following line of code in the .htaccess
file. Assuming your 404 page name is 404.html
you would write the following line of code:ErrorDocument 404 /404.html
Upvotes: 1
Reputation: 6111
If you want Google to delete the pages without carrying forward the references then a simple HTTP 404 will do the trick. If you want Google to forward the references (such as page rank and etc) to the new page then you would be better off using an HTTP 301.
Also See: Google 301 Recommendation.
Upvotes: 5