Serving different contents to search engines is called "cloaking" and can get you banned from their indexes.
Which for better or worse is a large portion of the modern internet.
Serving different contents to search engines is called "cloaking" and can get you banned from their indexes.