SitePoint Sponsor

User Tag List

Results 1 to 9 of 9
  1. #1
    SitePoint Addict Philip Toews's Avatar
    Join Date
    Dec 2001
    Location
    Kuala Belait, Brunei
    Posts
    367
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question optimizing for search engines with a php site

    I have been reading a lot of the articles on optimzing a site for search engine ranking. From the looks of things you need to have pages that spiders can read and then index. That means html pages doesn't it?

    On the other hand I want to create an almost purely php driven site. I need to be able to create session cookies that are independant of the cookie settings on users computers. A lot of my audience will be using computers that are not their own. That means that in many cases cookies will be disabled. I also want to incorporate a breadcrumb trail using PHP, that also means that all the pages need to be built as PHP pages.

    I'm a newbie to PHP, but it seems that PHP pages must have a .php extension. That means that they won't be indexed by spiders right?

    So how then does one build a site such as SitePoint so that it gets properly indexed by spiders?

    Any ideas oh wise ones?

    p
    Last edited by Philip Toews; Jan 27, 2002 at 23:41.
    Philip Toews Professional esl Educator and ASP.NET wannabe

    http://www.philiptoews.com
    philip@philiptoews.com

  2. #2
    SitePoint Addict DevilBear's Avatar
    Join Date
    Oct 2001
    Location
    Hades
    Posts
    301
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    To my knowledge, spiders index PHP pages just fine. At least Google does... here's a cached version of a PHP page (that just happens to be on the PHP website): http://www.google.com/search?q=cache...php+.php&hl=en

  3. #3
    SitePoint Enthusiast Fluffy bunny slippers's Avatar
    Join Date
    Oct 2001
    Location
    outside your house
    Posts
    96
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Philip Toews,

    You need to make semi dynamic pages. Meaning you have a master page that when refreshed it replaces all the .php with .html.

    Kev's book shows you how.

    fluffy bunny slippers
    If you like the look of my slippers you should see my undies!

  4. #4
    SitePoint Enthusiast stevem01's Avatar
    Join Date
    Apr 2001
    Location
    Modesto, CA
    Posts
    33
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    I haven't done this with PHP pages, but...

    Since your entire site will utilize PHP maybe you could just tell Apache to treat all of your .html files like .php files... so they are all pre-parsed and the output is like a static HTML page.

    If anyone sees anything wrong with that let us know... It's just a theory I had.

  5. #5
    SitePoint Addict Philip Toews's Avatar
    Join Date
    Dec 2001
    Location
    Kuala Belait, Brunei
    Posts
    367
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Can I submit PHP pages to search engines?

    Has anyone submitted php pages to search engines before? As mentioned below, my site pretty much needs to be pure PHP in order to take advantage of PHP sessions, etc. Will this get in the way when I need to start submitting my site to search engines?

    p
    Philip Toews Professional esl Educator and ASP.NET wannabe

    http://www.philiptoews.com
    philip@philiptoews.com

  6. #6
    Mlle. Ledoyen silver trophy seanf's Avatar
    Join Date
    Jan 2001
    Location
    UK
    Posts
    7,168
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Google is (I think still is) the only search engine that will index a page with querystrings, for example page.php?var1=something&var2=something

    If you are using Apache you can get round this. Check out this article:
    http://www.webmasterbase.com/article/485

    Method three is the best in my opinion

    Sean
    Harry Potter

    -- You lived inside my world so softly
    -- Protected only by the kindness of your nature

  7. #7
    Making a better wheel silver trophy DR_LaRRY_PEpPeR's Avatar
    Join Date
    Jul 2001
    Location
    Missouri
    Posts
    3,428
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    as Sean pointed out, a .php extension doesn't bother search engines at all. it's the presence of a "?" in the URL that some of them won't index. i don't really worry about it. Google indexes them, and it's all i care about. the other ones need to get with it!
    - Matt ** Ignore old signature for now... **
    Dr.BB - Highly optimized to be 2-3x faster than the "Big 3."
    "Do not enclose numeric values in quotes -- that is very non-standard and will only work on MySQL." - MattR

  8. #8
    SitePoint Addict Philip Toews's Avatar
    Join Date
    Dec 2001
    Location
    Kuala Belait, Brunei
    Posts
    367
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question So a straight .php extension won't mess things up!

    If I understand you guys correctly, if I use .php on the end of my pages (eg. the pages that are stored on the webserver) then google will index them. I'll be placing "normal" HTML descriptions of the pages on all of the pages before any PHP code kicks in....

    You guys don't think I'll have problems doing the kinds of things suggested in this article:

    http://www.promotionbase.com/article/646

    What about search engines other than google?

    Thanks guys.

    p
    Philip Toews Professional esl Educator and ASP.NET wannabe

    http://www.philiptoews.com
    philip@philiptoews.com

  9. #9
    Mlle. Ledoyen silver trophy seanf's Avatar
    Join Date
    Jan 2001
    Location
    UK
    Posts
    7,168
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Any search engine will index a site no matter what the page extension is, you run into problems when you have querystrings. The article gives you three methods of solving the problem

    Sean
    Harry Potter

    -- You lived inside my world so softly
    -- Protected only by the kindness of your nature


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •