问题
I have a website that redirects a user to the login page after a three page views. Will google bot be able to look at all of my pages or will it be redirected as well. If so, how can I get around this.
I found this answer in a question about googlebot,
if((!$user->uid) || (!strpos($_SERVER['HTTP_USER_AGENT'],"Googlebot")) || (!strpos($_SERVER['HTTP_USER_AGENT'],"MSNBOT")) ){
// redirect
else{
// don't redirect
}
Would this work?
回答1:
Do not serve up different content to search engines then you do your users. That's called cloaking and is a great way to get banned.
You should use "first page free". It's what sites like Experts Exchange use to allow Google to crawl their restricted content.
回答2:
Google Bot gets redirected and it will take content from the redirected page into its database as for the original URL.
来源:https://stackoverflow.com/questions/10356749/does-google-bot-crawl-entire-site-if-there-is-a-redirect