Different Home Page for Google Bot than For Normal Users

moonlighsunligh

Elite Member
Jr. VIP
Joined
May 1, 2010
Messages
2,442
Reaction score
470
Lets say i have domain http://example.com. In case google bot access my site i would like to serve example.com/main.html as home page. In all other cases home page should be as normal (accessed through http://example.com - default root pahe is index.php)

So far i come up with this:

Code:
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_USER_AGENT} .*Googlebot.*$ [OR]
RewriteCond %{HTTP_USER_AGENT} googlebot^$ 
RewriteRule ^index.php http://example.com/main.html [R=301,L]

Is that good?
 
Check out plugin 'default user agent' plugin for firefox. You can set your user agent as googlebot and test it yourself.
Posted via Mobile Device
 
Don't do this. It may seem like a short-term gain, but google pretty rapidly discovers this kind of trick and it's a great way to get your site banned. Doing shit like this shows google that without a doubt you intend to be blackhat.
 
Back
Top