HTTP error code and MessageIn our site we will we use http error codes to give appropriate error message and advise visitors to visit correct location by using various commands and codes. Here are some examples
301 Moved permanentlyWe have one old page and now we found that this is no longer required and visitor should go to another page. Just deleting the page or changing the navigation links pointing to the page is not enough. Other websites or search engines might kept links pointing to our page which is not in our control . To manage such situation we just keep the file with the following code inside it.
The above code is written in PHP. The first line says about the error type and give the message saying the page is no longer exit. The second line will redirect the visitor auotmatically to a different page marked for this. If you don't want automatic redirection then you can show a message and ask the visitor to click a link to move away.
echo "This topic is moved or deleted, return to <a href=https://www.plus2net.com>Home page</a>";The last line may not be required. Just a second line of protection if you have any code below it to.
404 Not foundThe required page is not found in the server so the visitor can be redirected to a custom error page saying sorry or any other message. This can be achieved by using .htaccess file or your web host can give you this page from your control panel.
Be the first to post comment on this article :
Search Engine Optimization and google articles
Webmaster tools to Diagnose problems and crawl issues
HTTP error code and messages
Search engine friendly page design
Quality Site for higher ranking in Search engines
Checklist for a new website for future ranking
Fast loading Page
Black Hat Search Engine Optimization - SEO
rel=nofollow: Preventing comment spam
robots.txt file of a site
google trends for comparing & monitoring traffic
Searching google within a site for number of pages