Optimising PHP Site

Discussion in 'Search Engine Optimization' started by Arcos, Mar 19, 2007.

  1. #1
    Can someone explain how to optimise a PHP site?

    I have been told that there is very little that can be done to optimise a PHP site for meta tags, keywords etc.

    Is this true?

    Obviously it is different to HTML but surely you can add Page Titles, Meta Description, Meta Keywords etc?

    Help!!

    Thanks
     
    Arcos, Mar 19, 2007 IP
  2. Kerosene

    Kerosene Alpha & Omega™ Staff

    Messages:
    11,366
    Likes Received:
    575
    Best Answers:
    4
    Trophy Points:
    385
    #2
    You can do everything in a php file you can do in an html file - just don't wrap it in <? ?>.
     
    Kerosene, Mar 19, 2007 IP
  3. mad4

    mad4 Peon

    Messages:
    6,986
    Likes Received:
    493
    Best Answers:
    0
    Trophy Points:
    0
    #3
    There is no difference between php and html. I could call the files .xyz and google would treat them the same as .html
     
    mad4, Mar 19, 2007 IP
  4. Arcos

    Arcos Peon

    Messages:
    474
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Hi

    Thanks for the reply!

    I have been told that there is VERY LITTLE that can be done on the SEO side for a PHP site.

    Having looked at the code behind a test page a lot of it looks like HTML with <***> including the page title!

    Do you need to be expert PHP to optimise a PHP site?
     
    Arcos, Mar 19, 2007 IP
  5. stymiee

    stymiee Peon

    Messages:
    427
    Likes Received:
    22
    Best Answers:
    0
    Trophy Points:
    0
    #5
    The search engines don't care about what server side technology you use. All they see is the (x)HTML your server side code generates. To see what they see simply load your page in your favorite web browser and then view the source. What you see is exactly what they see. So it doesn't matter if you use PHP. You optimize HTML.
     
    stymiee, Mar 19, 2007 IP
  6. mad4

    mad4 Peon

    Messages:
    6,986
    Likes Received:
    493
    Best Answers:
    0
    Trophy Points:
    0
    #6
    If the guy who designs your php site isn't allowing you the ability to change the title and meta tags for each individual page then tell him you need to be able to do this.

    Although you can see a lot of php code this won't actually be outputted to the user.
     
    mad4, Mar 19, 2007 IP
  7. Kerosene

    Kerosene Alpha & Omega™ Staff

    Messages:
    11,366
    Likes Received:
    575
    Best Answers:
    4
    Trophy Points:
    385
    #7
    There's actually a lot more you can do. PHP can be used to insert keywords, meta info, text, whatever into your page.

    By the time your page gets to a search engine or browser it's just the same as html.
     
    Kerosene, Mar 19, 2007 IP
  8. Arcos

    Arcos Peon

    Messages:
    474
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Sorry to sound a bit ignorant......

    I see how html files are optimised as straight html or .asp

    Just I dont know PHP and it seems that I am given some bum advice but these guys doing the work.

    I assume php works, in theory, in a similar way to .asp 'creating' the page when called and all of the information in php is stored in a sql database rather than access?

    So to optimise the php page additional fields simply need creating in the sql database?

    I see on a test page a lot of html code including a <title>****-****-****</title> so surely I can add <meta description>******

    Look forward to hearing from you
     
    Arcos, Mar 19, 2007 IP
  9. Kerosene

    Kerosene Alpha & Omega™ Staff

    Messages:
    11,366
    Likes Received:
    575
    Best Answers:
    4
    Trophy Points:
    385
    #9
    Just think of PHP as JavaScript that happens before it leaves your server.
    You can still use html in pages that contain PHP or JavaScript. The only difference is that PHP is magically turned into html by your server, so by the time it hits the outside world, it's just like any other html page.

    JavaScript = server > browser > fancy scripts
    PHP = server > fancy scripts > browser

    I hope my explanation didn't do more harm than good.
     
    Kerosene, Mar 19, 2007 IP
  10. Arcos

    Arcos Peon

    Messages:
    474
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    0
    #10
    Hi Kerosene

    Thanks for the reply.
    It does help clarify a bit :eek:

    Am still a bit confused as the test page is www.xxxxx.com/xxx.php and not www.xxxxxx.com/xxx.html

    Does this make any difference?
     
    Arcos, Mar 19, 2007 IP
  11. mad4

    mad4 Peon

    Messages:
    6,986
    Likes Received:
    493
    Best Answers:
    0
    Trophy Points:
    0
    #11
    The file extension makes no difference at all. You can set your server up so the extensions are .html for the php pages if you really want.
     
    mad4, Mar 19, 2007 IP
  12. boyponga

    boyponga Banned

    Messages:
    1,013
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #12
    Others use .htaccess by declaring PHP in HTML.

    Do this in your .htaccess:

    RemoveHandler .html .htm
    AddType application/x-httpd-php .php .htm .html
    PHP:
     
    boyponga, Mar 19, 2007 IP