Hello, First time poster. I've just moved my old site to wordpress and everything is working fine, except when I do a search in google for keywords relating to my site it brings up the old site pages which are now gone. Is there anything I can do to make google now look at the new site? Or do I have to wait for google to realise that the old site has gone and the new pages are on wordpress? The new site has been up for about 3 days now. Thanks for your help.
Wow you really are the king and fast too. I've just read through your article. I think this section concerns me most, but I'm unsure how to do it: "If you have moved some old page to a new page and want all visitors and search bots to redirect to your new page simply put any of the code into your old page : 301 PHP redirect Code to redirect old page to www.ankitrawat.com: < ? Header( "HTTP/1.1 301 Moved Permanently" ); Header( "Location: http://www.ankitrawat.com" ); ? > I've taken down the old pages, so where would I put this code. Thanks for bearing with me.
Never use PHP redirect unless you can't access or alter your .htaccess file, that is not the proper way to do it. You want to do 301 redirecting with the .htaccess file, ignore those on DP who wish to just spam their articles and not actually display any information. Below is the code you must insert into your htaccess file, you must make a new entry for each URL your redirecting. Redirect 301 /oldwebpage.html http://www.newsite.com/newpage.html Code (markup): The .htaccess file can be located in the top-level directory where you host your websites.