Jump to content

homepage - Does it HAVE to be index.html?


barbs75

Recommended Posts

Hey guys,

 

This is a REAL simple question, regarding a homepage for a site? I ahve googled this issue as well and can never seem to find any useful information....

 

Basically, am i right in saying that your homepage has to be index.html?? or can it be say index.php? or index.shtml for example??

 

The only reason being, is i have includes called topContent.html and bottomContent.html which i include on my webpages using a php include script, and i want to be able to do this on my index page, the default page that is open when you type in the URL for the website.

 

Im pretty sure there is a way of changing the page from index.html, but what is the practice for this? is it a coding issue or a server or hosting setting??

 

If you could help me out that would be great

 

Cheers guys

 

Craig (Barbs75)

Link to comment
Share on other sites

You can use any extension for your index I.E. php, shtml, asp, html, etc. If you are going to use php includes for your header and footer content on your index page then the content you are calling needs to be php as well. It is best on index pages to use straight content as it helps spiders crawl and index your page. It is having to crawl a page with links for other content it you won't get high index rankings. 

Link to comment
Share on other sites

You can use any extension for your index I.E. php, shtml, asp, html, etc. If you are going to use php includes for your header and footer content on your index page then the content you are calling needs to be php as well. It is best on index pages to use straight content as it helps spiders crawl and index your page. It is having to crawl a page with links for other content it you won't get high index rankings. 

 

absolutely incorrect. Php pages are parsed by the php server and then sent as plain html. Spiders like google don't need to crawl "extra links."

 

You have to change the .htaccess file to change the default names. (I believe so). So you can use any page name you want. You can use "homepage.asp" or "default.php". In the .htaccess you need to create a hiarchy - which extension takes priority and which name is looked for - which is usually "index".

Link to comment
Share on other sites

You don't have to have a specific "index" page, for a long time I used www.example.com/home.php. I try to only use includes that is processing PHP through cookies and sessions throughout my website. Using includes just to include simple HTML code is unneccesary and downright stupid.

Link to comment
Share on other sites

It is absolutely correct what I said. Spiders don't crawl include pages thus making them incomplete when they are indexed.

 

What are you talking about? The include is performed on the server, then sent to the spider. The spider won't even know if its an include or not.

Link to comment
Share on other sites

It is absolutely correct what I said. Spiders don't crawl include pages thus making them incomplete when they are indexed.

 

Yes on your index page just make it straight content.

 

Dude, you might need to read some books and grasp a basic understanding what php is. It isn't like frames/javascript i-frames where you need to make multiple requests to grab more than one file at a time. Instead the server does all the work and sends it all out in one request.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.