When I hosted the site, the pages were html files. Later to add more functionality I converted them to php files.
But search engines have already indexed those .html files. So when a visitor comes after a search in Google, the ‘ File Not Found’ error is displayed.
We can avoid this using 301 redirect.
When a visitor searches for a webpage, the webserver looks for .htaccess file. This file contains information about redirection, security etc.
If your server already has this file always update it rather than replacing it with a new file.
If the server does not have the .htaccess file open a .txt file and save it as .htaccess file.
Redirect a webpage using 301 Redirect
redirect 301 /Kids.html http://www.worth2read.org/kids.php
Edit the .htaccess file or open notepad, add redirect 301 statement, save it as .htaccess file.
The search engines won’t read the .htaccess file, but follow the rules that are created in .htaccess.
We can test this by typing the old URL, for example www.worth2read.org/kids.html
Actually this file is not in the server. Instead kids.php is there.
When Google updates it next time, the new file name will replace the old file.