Forum Moderators: open

the name of my main html file

         

georgimakarti

10:59 am on Jul 8, 2024 (gmt 0)

Top Contributors Of The Month



Should i use index.html naming for my main webpage

coothead

2:41 pm on Jul 9, 2024 (gmt 0)

5+ Year Member Top Contributors Of The Month



I can think of no good reason not to.

Further Reading

Understanding the index.html page on a website [thoughtco.com]

coothead

Featured image: webmasterworld
www.thoughtco.com
Understanding the Index.html Page on a Website
The index.html pages are the default pages for your directories. This tutorial explains how to use them for user experience and security reasons.

lucy24

10:58 pm on Jul 9, 2024 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Are you asking about the name of the physical file--which need never be seen by any visitor, whether human or robot--or the visible URL?

georgimakarti

9:01 pm on Jul 16, 2024 (gmt 0)

Top Contributors Of The Month



the physical file not the visible url. the main page on the website.

phranque

10:59 pm on Jul 16, 2024 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



when a directory URL is requested, including the home/root directory of a site, the server should provide an index of the requested directory.
in some cases this may be an auto-generated list of files contained in the requested directory.
on most servers, you may specify and provide a default directory index document for each or any directory.
by convention this file has typically been named "index", with the file extension typically based on the implemented technology, although you may typically specify and use any arbitrary name.
(i.e. index.html, index.htm, index.php, index.cgi, etc)
In an Apache configuration, the DirectoryIndex directive would be used to specify the default directory index document.
mod_dir [httpd.apache.org]

lucy24

11:23 pm on Jul 16, 2024 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



You can call the physical file anything you like, provided
(1) if you use something other than index.html, make sure you have the appropriate DirectoryIndex directive in place
(2) set up a redirect for anyone who requests /index.html by name. Typically this will go immediately before your overall canonicalization redirect (the one that deals with http/https and with/without www).
(3) make sure you set your Options to -Indexes for the site as a whole. This can be overridden for directories that have no index.html but you don't mind visitors seeing a list of all directory contents. Typically this applies to things like image directories that contain no pages.

If you need more guidance about any of this, step next door to the Apache subforum.
 


 


 


 

Status: 403 Forbidden