PHP Includes And SEO...Opinions Please

Discussion in 'Search Engine Optimization' started by MKInfo, Jan 18, 2008.

  1. #1
    When using a php script to run a website which has php includes which method do you think is best (if any) for search engines.
    Example:
    include header.php
    include navbar.php
    include menu.php
    PAGE CONTENT HERE
    include footer.php

    or

    include header.php
    PAGE CONTENT HERE
    include navbar.php
    include menu.php
    include footer.php

    In the second example the content loads first so would that help in site indexing and seo etc?
    Or am I barking at the moon?:D

    MK
     
    MKInfo, Jan 18, 2008 IP
  2. Diablos

    Diablos Guest

    Messages:
    563
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Yeah the second option is probably best. More keyword rich content higher up the page :)
     
    Diablos, Jan 18, 2008 IP
  3. MKInfo

    MKInfo DP Guard Dog

    Messages:
    1,481
    Likes Received:
    97
    Best Answers:
    0
    Trophy Points:
    140
    #3
    Thanks Diablos.
    The content is still in the same order on the page but loads in a different order.Would this mean that the SE's would see the content first when it crawls the page and is it an advantage?
     
    MKInfo, Jan 18, 2008 IP
  4. JagNet

    JagNet Peon

    Messages:
    18
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #4
    It makes no difference what order you include the files on the server side. The search engines see only the resultant html page, so if the page structure as a whole doesn't change as a result then there's no difference for either the search engine or the end user.
     
    JagNet, Jan 18, 2008 IP
  5. Philopoemen

    Philopoemen Peon

    Messages:
    704
    Likes Received:
    19
    Best Answers:
    0
    Trophy Points:
    0
    #5
    As JagNet said, nobody cares about the order of includes. All that matters is the end-result.

    It is recommended to have the content as high as possible in the code, i'm currently still running some experiments, trying to see how much of a difference that makes.
     
    Philopoemen, Jan 18, 2008 IP
  6. BILZ

    BILZ Peon

    Messages:
    1,515
    Likes Received:
    62
    Best Answers:
    0
    Trophy Points:
    0
    #6
    It make no difference whatsoever. PHP includes are performed server-side. So, the search engines aren't going to be aware of the includes.
     
    BILZ, Jan 18, 2008 IP
  7. sultanofseo

    sultanofseo Notable Member

    Messages:
    9,930
    Likes Received:
    405
    Best Answers:
    0
    Trophy Points:
    265
    #7
    it doesn't matter which one you use but it is ideal not to use it too much on a single page. i usually try to use no more than 2 includes on a single page. it does make the server work a little harder to process the request for the content to be included in a page. after all, this is an extra step and it does take the server an extra time to process the request.
     
    sultanofseo, Jan 18, 2008 IP
  8. MKInfo

    MKInfo DP Guard Dog

    Messages:
    1,481
    Likes Received:
    97
    Best Answers:
    0
    Trophy Points:
    140
    #8
    Thanks guys.I am going to experiment myself with the content bit.Great advice :)
     
    MKInfo, Jan 18, 2008 IP
  9. budhanes

    budhanes Peon

    Messages:
    245
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #9
    I'd go with the second option. "Supposidly" the search engines read the info from the top and go counterclockwise. I have seen many times that the menu should not be in the top left hand corner for this reason. I've created some sites that are tableless and use alot of css to try this theory out. I have seen alot of websites "description text" validating this theory... I could be wrong though..
     
    budhanes, Jan 18, 2008 IP
  10. Philopoemen

    Philopoemen Peon

    Messages:
    704
    Likes Received:
    19
    Best Answers:
    0
    Trophy Points:
    0
    #10
    Yes, if you don't have a unique meta description for every page, then the bots usually take first text that comes after <body>. So if you have your content after <body>, then the meta descriptions will be good looking.
     
    Philopoemen, Jan 19, 2008 IP
  11. flagday

    flagday Peon

    Messages:
    348
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #11
    As stated, PHP is not the way to do this, CSS is.

    You can include your header and navs last, and have that code at the bottom of the resulting HTML page; as long as the CSS tags position them properly on the page, you're good. What users will see is:
    Header
    Menus
    Body
    Footer

    The HTML code will read:
    Body
    Header
    Menus
    Footer
     
    flagday, Jan 19, 2008 IP
  12. EzBusinessNeeds.com

    EzBusinessNeeds.com Peon

    Messages:
    453
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    0
    #12
    Use CSS and make of DIV to set the content to appear at the top of the codings but still appearing as normal to the users. You need to guide the spiders to read your content first.
     
    EzBusinessNeeds.com, Jan 19, 2008 IP