title: How to redirect only spider bot to another site
body: <p>I'd like visitors to continue see a domain (www.example.com) but searchengines have to redirect to the new site (www.newsite.com).</p>
  
  <p>I need this redirect only for the homepage. I know I can achieve this with a rel canonical but if I'd want to insert something in htaccess how can I do this?</p>
  
  <p>In <a href="https://stackoverflow.com/questions/27088045/how-to-redirect-all-visitors-but-search-engine-bots-using-htaccess/27245645#27245645">this link</a> i see something similar (the opposite of what i need), but I dont'know how to ajust it so it suits my needs.</p>
  
  <p>this is my htaccess (where i can put the code lines?)</p>
  
  <pre><code>IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*
  
  &lt;Limit GET POST&gt;
  order deny,allow
  deny from all
  allow from all
  &lt;/Limit&gt;
  &lt;Limit PUT DELETE&gt;
  order deny,allow
  deny from all
  &lt;/Limit&gt;
  AuthName example.it
  
  # BEGIN WordPress
  
  &lt;IfModule mod_rewrite.c&gt;
  
  RewriteEngine On
  RewriteBase /
  RewriteRule ^index\.php$ - [L]
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule . /index.php [L]
  &lt;/IfModule&gt;
  &lt;IfModule mod_deflate.c&gt;
  # Insert filters
  AddOutputFilterByType DEFLATE text/plain
  AddOutputFilterByType DEFLATE text/html
  AddOutputFilterByType DEFLATE text/xml
  AddOutputFilterByType DEFLATE text/css
  AddOutputFilterByType DEFLATE application/xml
  AddOutputFilterByType DEFLATE application/xhtml+xml
  AddOutputFilterByType DEFLATE application/rss+xml
  AddOutputFilterByType DEFLATE application/javascript
  AddOutputFilterByType DEFLATE application/x-javascript
  AddOutputFilterByType DEFLATE application/x-httpd-php
  AddOutputFilterByType DEFLATE application/x-httpd-fastphp
  AddOutputFilterByType DEFLATE image/svg+xml
  
  # Drop problematic browsers
  BrowserMatch ^Mozilla/4 gzip-only-text/html
  BrowserMatch ^Mozilla/4\.0[678] no-gzip
  BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
  
  # Make sure proxies don't deliver the wrong content
  Header append Vary User-Agent env=!dont-vary
  &lt;/IfModule&gt;
  
  # END WordPress    
  </code></pre>