Forum Moderators: Robert Charlton & goodroi

Message Too Old, No Replies

Google and PHP header()

Google and PHP redirects using header()

         

dareRock

3:31 pm on Jul 31, 2005 (gmt 0)

10+ Year Member



Hey there...I'm a newbie and have a question wrt google indexing pages with a PHP redirect using header()....

Basically, I have numerous pages with content (4000+) that should only be accessible by registered users. If I use a structure similiar to whats describe below, Will google still index these pages for their content?

I heard google like 'big' websites.

NOTE: the 'isLOggedIn.php' script checks to see if the user is signed in. If true, stay on the page, else, redirect (using header())to 'not registered page'.

------------------------------------------
<?php include('../include/isLoggedIn.php');?>
<html>
..
..
<p>My page content here</p>
..
..
</html>
-------------------------------------------

Thanks for any insight you can give me...much appreciated.

encyclo

5:51 pm on Aug 1, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to the forums, dareRock.

If you require a login before viewing your content then no, Googlebot will not be able to access the page. You can use cloaking to allow access to specific spiders whilst requiring a login for other users, but in that case even if you get a click-thru from the SERPs the overwhelming majority of potential visitors will simply click the back button rather than registering just to view the page.

You can't have your cake and eat it, as they say... If you want your content indexed and viewed, then you have to lower the barriers to access.

dareRock

10:53 pm on Aug 1, 2005 (gmt 0)

10+ Year Member



Thank you for the insight encyclo....very much appreciated.....I'm going to have to look into 'cloaking' a little more and figure out how to permit googlebot to read the content.

Again, Thanks.

arthurdaley

11:05 pm on Aug 1, 2005 (gmt 0)

10+ Year Member



Even if you cloak it people like me will just click on the Google cache to see what the page content was anyway.

seo_guru

5:46 am on Aug 3, 2005 (gmt 0)

10+ Year Member



yes visitors can check out the content from google cache.

grandpa

6:29 am on Aug 3, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Over here [webmasterworld.com] it was suggested that you could use the NOARCHIVE metatag to prevent caching.

Wizard

7:20 am on Aug 3, 2005 (gmt 0)

10+ Year Member



You should do exactly the opposite: if user is logged, redirect to page with content for logged users. By default, serve a content for not logged users.

And I see no point discussing the obvious, that Google should index the content for not logged users - first, because everyone can pretend to be Googlebot and fetch the content for Google, second - it's wrong to stuff Google results which require registration - it's stealing time from people who follow such result and face necessity to register instead of content they were looking for. Google is expected and very likely to penalize such site.

os_t

4:53 pm on Aug 3, 2005 (gmt 0)



I think cloaking never is a good idea...
there will be/are some mechanism (proxies) to find out if a webpage is cloaking and if google does find out you will get kicked...

dareRock

6:14 pm on Aug 3, 2005 (gmt 0)

10+ Year Member



ok...so it looks like cloaking has it's winfalls....so, just brainstorming, what about this idea for the originally proposed structure of a webpage....

Design the page using two seperate CSS's....one that makes the content 'hidden' to users who are not logged in, and the other which makes the content 'visible' when the user is logged in....

I know anyone can view the source to get the content, but will Google index the content even if the visibility property for the surrounding tag is set to 'hidden'?

theBear

6:37 pm on Aug 3, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



ROTFLMBFBAO (Big Fat Bear)

Thanks, I needed that laugh.

Lets see replace cloak by hidden text. rinse and repeat.

dareRock

2:54 pm on Aug 5, 2005 (gmt 0)

10+ Year Member



theBear - i guess thats a no?

theBear

4:26 pm on Aug 5, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



No it isn't a no, Google will index the "hidden text" but if they have reason to look at the pages you may find the site removal tool functions very fast.

If you get my drift.

I would allow Google to spider the pages only if the pages were open to the public, otherwise folks are going to feel misled and might ask Google to take a look.

It's your site so the call is yours, it is Google's index so they determine what is findable when folks use it.

If you go with any of the mentioned methods you best have someway of promoting the site that doesn't involve search engines.

You could split your content up into a private/paid/subscription section blocked off from the search engines and a section that is open that you allow the search engines to spider but say runs a few weeks etc. behind the closed section.

dareRock

4:59 pm on Aug 5, 2005 (gmt 0)

10+ Year Member



ic...thanks for the input theBear...much appreciated