Is it necessary to have index.php / html in our website??

6 replies
  • SEO
  • |
Hi friends,

I am a newbie. I know about URL and folder name optimization. But i just want to ask the necessity of index page in our website. Instead of having index.php or index.html, why don't we simply go for the keyword like help_desk_software.php or help_desk_software.html. Is it good??
#html #indexphp #website
  • Profile picture of the author bizwebstart
    Hi there

    Most servers are set up so that you will need index.html or index.php - you will need to check with your hosting company.

    If you don't put this page in say for example your root folder then when someone types in your domain they will see a list of files that are on your website which can be a bit of a security risk rather than seeing the page you want to display.

    I believe though you can set your root page but yet again unless you have your own server you will need to talk to your hosting company.

    I hope this makes sense

    Kind regards
    Signature
    Need a Video creating? Affordable Web Videos
    {{ DiscussionBoard.errors[3088893].message }}
  • Profile picture of the author cameronlaw
    I'm really not sure, but maybe you could have an index.php file that redirects to yourdomain.com/yourkeyword.htm
    {{ DiscussionBoard.errors[3089123].message }}
    • Profile picture of the author iyah
      I have found it necessary to add the following to the start of the templates index.php file. Index.php is blank or shows no error. Index.php also Display a list of posts in excerpt or full-length form. Choose one or the other as appropriate. To use the Template Hierarchy, you basically need to provide special-purpose Template files, which will automatically be used to override index.php. For instance, if your Theme provides a template called category.php and a category is being queried, category.php will be loaded instead of index.php. If category.php is not present, index.php is used as usual.
      {{ DiscussionBoard.errors[3089159].message }}
  • Profile picture of the author auradev
    Yes it is completely a server thing, and if you know what you are doing you can tell your server to look at something other than index.whatever

    It is always optimal for seo for the page name to have your keywords in it.

    There are ways to do this that are better than others...

    example

    domain.com/keyword/

    vs

    domain.com/keyword.html

    People tend to like the first example better.
    {{ DiscussionBoard.errors[3097936].message }}
    • Profile picture of the author paulgl
      Many hosts have this setup. That is, they have a stock index page that shows.
      They also configure to show the index.html or the index.php if one is found.
      One will take precedence over the other one.

      The best way to find out, is type in your domain.com/index.html or
      domain.com/index.php and see which one loads. If they both load, only
      one will take precedence when someone types in domain.com. It will either
      go to one or the other.

      I know on my sites' host, the index.php is the default. Which means, even if I create
      an index.html, I won't get there simply by typing in domain.com
      If I'm not going to use php, I simply delete the index.php and create
      the index.html and it automatically goes to default.

      Paul
      Signature

      If you were disappointed in your results today, lower your standards tomorrow.

      {{ DiscussionBoard.errors[3098048].message }}

Trending Topics