Show the private area at google

Discussion in 'Site & Server Administration' started by Nightmare, Jun 1, 2006.

  1. #1
    Hi!
    I have a site with a limit for guest, ex. I guest can only view 20 pages of the site, after 20 page you must register to view the rest of the website.

    For sure google does not register to my site, so I need to consider google as registered user.

    Its a good solution to control the user agent? or google does not like this method?

    Thanks!
     
    Nightmare, Jun 1, 2006 IP
  2. Zany_Jim

    Zany_Jim Peon

    Messages:
    144
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #2
    usally most of the top forum software will let the search engine bots access to your whole site so they can index. So i don't think it would matter.

    What you using?
     
    Zany_Jim, Jun 1, 2006 IP
  3. Nightmare

    Nightmare Peon

    Messages:
    79
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Its not a forum script but a script I made by myself.
     
    Nightmare, Jun 1, 2006 IP
  4. MatthewN

    MatthewN Well-Known Member

    Messages:
    859
    Likes Received:
    30
    Best Answers:
    0
    Trophy Points:
    195
    #4
    I have seen a few sites block guests but allow robots. No idea how to do it... but it seems to work well for them.
     
    MatthewN, Jun 1, 2006 IP
  5. infin8

    infin8 Peon

    Messages:
    42
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #5
    In your script, you have to put some code to allow for user agent: GoogleBot or allow by datacenter IP. Allowing for IP would be safer, but you would have to keep your list updated with all of the googlebots.

    edit: here is how you get user agent (you are looking for 'Googlebot' here):
    
    $HTTP_SERVER_VARS['HTTP_USER_AGENT']
    
    Code (markup):
    here is how you get the user's ip address:
    
    $HTTP_SERVER_VARS['REMOTE_ADDR']
    
    Code (markup):
     
    infin8, Jun 1, 2006 IP