Here is my question, Recently I moved my site from blog.mysite.com to www.mysite.com.Then I added 301 permanent redirection using this code in .htaccess file.RewriteEngine onRewriteCond %{HTTP_HOST} ^blog\.mysite\.com$ [OR]RewriteCond %{HTTP_HOST} ^www\.blog\.mysite\.com$RewriteRule ^/?$ http\:\/\/www\.mysite\.com\/ [R=301,L]Everything was OK, and when I go to my site by typing blog.mysite.com it automatically redirected to www.mysite.com.But, I found that when I click a Google search result of my old site  doesn't redirect to the new site. Guess Google result URL is http://blog.mysite.com/how-to-create-simple-but-fully-styled-navigationThough it doesn't redirect to http://www.mysite.com/how-to-create-simple-but-fully-styled-navigationIt only goes to the old URL which is http://blog.mysite.com/how-to-create-simple-but-fully-styled-navigationwhich shows my hosting provider's 404 Error page. So, then what I did was creating a custom 404 error page and added a php code to get the  Google's search result URL and replace the word 'blog' with 'www' then redirecting to http://www.mysite.com/how-to-create-simple-but-fully-styled-navigationSo, now everything's working perfectly and no any error pages. But I want to know if what I've done is OK with SEO logics. I've heard that 301 permanent redirection tells the Search engines that the site has moved. And where the new site is.I want to know if there's no damage to 301 redirection after I've created custom 404 page and added a tricky redirection...Thanks... Hope you understand. :-)
Is it OK to redirect to a new address instead of showing 404 Error page?
redirects;seo
Google SEO logic is always a tightly held secret, but moving your domain can/will always result in a lower site ranking. By having the auto forward setup the way you did you might be effectively giving Google two sites (so far as it knows) to keep page rankings for, and as a result your ranking will always be lower if it is being divided among two or more domains.This is always the result when you move a domain anyway. As a service to your viewers it is your responsibility to make your best effort to keep any bookmarks they may have had valid for as long as possible... which you have done.I have the suspicion that Google will tell you that what you are doing is correct as it is in your viewers best interest to keep your site functioning in the manner that they are accustom to. However you may be in the gray area between providing good service and using the best SEO.Living in the gray area between good service and good SEO is not a bad place to be if you think of it as the best of both worlds. Google is pretty smart, and it is only a matter of time for any loss you had to be corrected so long as your site is still servicing your viewers and they are still coming to your site, no matter how they are getting their.Another option that might be available to you through your host is to autoforward blog.yoursite.com to www.yoursite.com as a wildcard forward. This will have the same forwarding effect you already have, and it should/may also give Google bots some feedback as well.