Forum Moderators: open

Message Too Old, No Replies

How to Cloak Forum Site Safely?

         

cowcool

5:23 am on Aug 26, 2006 (gmt 0)

10+ Year Member



I have a private forum site that requires registration for viewing. I want all threads to be indexed by search engines but when human user click on search engine listings they will get redirected to registration page before they can view the thread. What is the safest way to do this without getting penalized by serach engines?

Thanks!

volatilegx

6:33 pm on Aug 26, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I'm not going to write the code for you, but if your forum is in PHP, it would be pretty easy to write a cloaking module that would handle your application.

You would include() a module at the top of each page (before any other output is made so PHP can send headers) that would handle the cloaking.

First, it would check to see if the visitor is a registered user by looking for a cookie. If a cookie is found, the module exits and the page is displayed.

If no cookie is found, the module checks the IP address and/or User-Agent of the visitor to see if it belongs to an approved search engine. If it does, the module exits and the rest of the page is displayed.

If the visitor is not a search engine spider, and has no cookie, they are sent a header to redirect them to the login page, then the module exits.

There are existing PHP scripts that can handle the search engine spider identification portion and redirection parts, both commercial and free, but I don't want to link to them publicly.