What is the best way to 301 redirect a website to another website directory? For example: http://www.website.com must redirect AND PASS PAGERANK to: http://www.website2.com/blog/ Thanks
The best way to redirect those pages is by using something called a "301 Redirect". What this 301 redirect does, is it blatantly redirects to a different page when it is triggered. What makes the 301 redirect the best? Not only does it accomplish your redirect - it does it safely. No having to worry about the search engines penalizing you for it. To be specific, the 301 redirect tells the browser, or in other cases, it tells the search engines "Hey this page has been moved, here is the correct URL!". Think of it as you getting mail that is not addressed to your name. Possibly addressed to somebody who has lived there prior to yourself. What do you do? You tell the post man (or woman) "Hey they don't live here anymore, here is the correct address". It is the same concept, pretty simple stuff.
Hi thanks, yes I know that is why I have called the original first message 301 redirect. My questions really was: Since I see many example of code to achieve this goal, which one is the best to redirect from a website to another webside directory and not loosing PageRank in the process? Thanks and sorry if I wasn't clear enough. I look for the best code example for the htaccess file.
You'll have to mess around with your .htaccess file. That'll make your domain redirect to the one you want. Yugo,
To redirect ALL files on your domain use this in your .htaccess file if you are on a unix web server: redirectMatch 301 ^(.*)$ http://www.domain.com redirectMatch permanent ^(.*)$ http://www.domain.com Hope this help you in redirecting.
Hi thanks, finally we're getting there Does it work also if I have to redirect to a directory. i.e.: instead of: redirectMatch permanent ^(.*)$ http://www.domain.com I would use: redirectMatch permanent ^(.*)$ http://www.domain.com/blog/ Would that work? Thanks
you can make it by the domain manager which you want to redirect. it can be from the dns control but you must check it in the help of the company which you registered the domain. you can make it also from the htaccess file by a simple statement