index.html v......

I have encountered something strange.  Can you help please?
I have a file index.html which is the home page for
http://www.domain.com
I have just discoverd that if I enter www.domain.com into the address bar I get a different home page to the one I get if I enter www.domain.com/index.html.
Can you explain please and suggest what I can do to ensure only one  page comes up as the Home page.
digiselAsked:
Who is Participating?
 
Dave BaldwinConnect With a Mentor Fixer of ProblemsCommented:
Each web server maintains a list of 'default documents'.  When you enter just http://www.domain.com/ ,  it will bring up the first one in the list that actually exists in the default directory.  Either rename the other file or delete it.
0
 
digiselAuthor Commented:
I do not understand what do you mean when you say: "Either rename the other file or delete it"
If i delete http://www.domain/index.html I will not have a Home page.
What is the "other file"?
0
 
Dave BaldwinFixer of ProblemsCommented:
You said you get a different home page when you enter http://www.domain.com/ .  'index.html' is not the only filename that can be used as the default page in a directory.  If your server supports PHP then 'index.php' is usually one of the options.  If your web server is IIS, then 'default.asp' is another option.  You can go into the web server setup and enter any name you want.  Your situation is that one of those other possibilities is higher on the list of default pages than 'index.html' is.  Look for other files that start with either 'index' or 'default' in that directory.
0
The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

 
Scott Fell, EE MVEConnect With a Mentor Developer & EE ModeratorCommented:
Look for other files on your server such as index.htm, default.htm, default.html, index.aspx, index.asp, index.php, default.php, default.asp, default.aspx.   Typically your server is set to accept multiple types of "default" file formats that could be anything from the list or even some custom default pages. Although since you don't know what that is, I wouldn't expect that.  

If you find any of these other files on your server, copy them to a back up, then remove them.
0
 
digiselAuthor Commented:
i have looked for  index.htm, default.htm, default.html, index.aspx, index.asp, index.php, default.php, default.asp, default.aspx.  
in the wwroot directory and none appear there.  
the only one is index.html
All the files are .html
0
 
Dave BaldwinFixer of ProblemsCommented:
Ok, do you have a file named '.htaccess' in that directory?  What kind of web server is it?
0
 
digiselAuthor Commented:
no.  there is not a .htaccess  in that directory.
it is a windows server
0
 
Scott Fell, EE MVEDeveloper & EE ModeratorCommented:
If you are on a shared server, check if you have any custom error pages set up.  Check to see if you have a web.config file (the windows version of htaccess).
0
 
digiselAuthor Commented:
None of these appear in the wwwroot: custom error pages set up or web.config file
0
 
digiselAuthor Commented:
if I disable the index.html file the site goes down
0
 
digiselAuthor Commented:
i think i might have discovered the problem.
i removed the index.html extension to get to www.domain.com
I then refreshed the page and up came the same version as with the .index.html extnesion.
it would seem to be a cacheing problem.
do you agree?
0
 
digiselAuthor Commented:
thanks for your help
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.