Files with .php extentions and html code...

Discussion in 'Search Engine Optimization' started by dp11, Feb 5, 2007.

  1. #1
    I've been using NVU to build some web pages.

    I didn't know that it could be used to work with
    html files only ;-)

    Anyway, what I've realized is that when I changed
    the extension of some pages, from .html to .php
    I was able to open these pages without any problem
    at all.

    However, when I checked the source (code) I found
    out none of the html code was altered as if I had never
    changed their extensions.

    In fact, each page even had the first line of code intact:

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" >

    So my questions are:

    Is it OK if I go ahead and publish my web pages
    with .php extentions but that contain pure html code???

    Would this affect my website in the search engines?

    Should I go back and code my pages with the
    corresponding php code ?


    I'll appreciate your feedback.
     
    dp11, Feb 5, 2007 IP
  2. Dudibob

    Dudibob Peon

    Messages:
    618
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    0
    #2
    it doesn't matter what extension your files have (.htm, .html, .php etc) as long as they turn out spiderable coding :)

    Just curious, why are you making them .php extentions? is it because the rest of the site is made in php?
     
    Dudibob, Feb 5, 2007 IP
  3. Cryogenius

    Cryogenius Peon

    Messages:
    1,280
    Likes Received:
    118
    Best Answers:
    0
    Trophy Points:
    0
    #3
    This should be fine. Search engine will only see the final HTML, so it doesn't matter what extension it is.

    Cryo.
     
    Cryogenius, Feb 5, 2007 IP
  4. Icheb

    Icheb Peon

    Messages:
    1,092
    Likes Received:
    31
    Best Answers:
    0
    Trophy Points:
    0
    #4
    You could name them .henry and it wouldn't affect anything. And how do you suppose Google should go about finding out if your pages are coded with PHP or not? Hack into your server?
     
    Icheb, Feb 5, 2007 IP
  5. KC TAN

    KC TAN Well-Known Member

    Messages:
    4,792
    Likes Received:
    353
    Best Answers:
    0
    Trophy Points:
    155
    #5
    PHP is server-side, hence, it does not matter to SE as they only see HTML from their perspective :)
     
    KC TAN, Feb 5, 2007 IP
  6. dp11

    dp11 Guest

    Messages:
    9
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6

    I've always been undecided as to which extension to use for my
    web pages (I even posted a separate post regarding this).
    So, just after finishing up all my pages with the .html extension,
    all of a sudden I decided to change the .html extension (coded
    with pure html code) to .php ;-)

    I don't know, I'll probably go for .php from now on...
     
    dp11, Feb 5, 2007 IP
  7. Icheb

    Icheb Peon

    Messages:
    1,092
    Likes Received:
    31
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Use mod_rewrite, then you might as well not use a file extension at all. :)
     
    Icheb, Feb 5, 2007 IP
  8. Dudibob

    Dudibob Peon

    Messages:
    618
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    0
    #8
    yeah, there's no weight in a page extension for SEO purposes but best to keep a theme for userbility ;)

    just a quick note - were your .html pages indexed and ranking? because getting rid of them will cause your site to loose the rankings for those pages and the size of the site will look alot smaller for a while to the SE's :/
     
    Dudibob, Feb 7, 2007 IP
  9. Dassie

    Dassie Peon

    Messages:
    134
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #9
    I agree with what is being said here, as having and extension for a page that doesn't correspond with the source code of the page, won't cause any penalty of that sort on your pages.And as for what extension you should use, again it doesn't matter as long as everything looks and works perfectly.
     
    Dassie, Feb 7, 2007 IP