Please explain saving file as Index.html

+3 Cooper Cecil · August 12, 2014
Newb here...beginner!

I guess I am the only one having a problem understanding this, but: How can you name your website index.html over and over again? I mean, I make one website, send it to a host server as index.html, then go back to my computer and create a new different website. How can I save it as index.html??The other website is saved under that name and I don't want to delete it. Do I have to figure out now how to rename the old website on my computer and set up the new one as index.html?

Please clarify.


Post a Reply


Oldest  Newest  Rating
0 Savad Dekrup · August 12, 2014
You could delete the file on your computer and make a new one, it won't affect the website that is hosted. 
Or you could just create a folder and hold the file that you didn't want to delete.
0 Yannis Sp · August 12, 2014
I didn't understand your question pretty well but if you want the new one to be your index.html then you just replace the old one with the new one.If you want to have them both you put another name to the new one (index.html).You don't have to put the name index at all if you want.Now for the program that does those transactions is the FileZilla.
+2 Eugene Botma · August 12, 2014
I think there is a lot of confusion here between a website and a web page.

Generally, you need a index.html file for a website. It is a single page and the landing page of a website. A website usually has more than one page. You can name these pages whatever you want as long as it has the .html extension. To view these pages, where you usually type, you now just type

This way you can have multiple web pages in the same directory. An alternative would be to create a new directory for each page and then make a index.html page for each directory. I would not recommend doing so unless there is a good reason for it.

If you want to host a whole new website instead of just more pages, you just need to create a new directory and add all of the files there.

Summary: Website does not equal webpage.
   webpage: a single page of information
   website: a group of webpages
webpage name does not have to index.html
index.html is only the landing page for a website or directory
0 Cooper Cecil · August 12, 2014
Still kinda fuzzy. I have seen a few tutorials that both recommend saving your work as index.html. So all my html(for one project) is in the file index.html. All pictures associated with the page are in the same directory. Then I go to a web host and upload index.html, because for some reason this is a way computers ID a site. So now I have up loaded it, and now I want to go back and begin a brand NEW web page. I need to use the same file name so it can be recognized as a web site by the host Index.html. While I'm at it, I have three other projects that I need to make for three separate clients.(working on multiple web pages) I can't save them all as Index.html. Doesn't make sense. I guess I will name them whatever I want to. I don't know how I will host them with the preferred index.html file name, though. using the same index.html for every website I publish just doesn't make sense at all to me. Lots of switching and renaming files on my desktop etc...
Am I picturing this all wrong?
+2 Eugene Botma · August 12, 2014
I think the easiest way to explain this would be to make a demo directory listing of a website, so here goes:
+images   <---typing in will probably result in an error 404
+projects    <-- going to will load the file
  -index.html   <--- landing page for
  -project1.html   <--- to see this file go to
-contact.html  <--- to see this page, go to
-index.html    <---website landing page

in the above website, All 6 web pages use the basic.css and extra.css file, as well as image1.jpg and image2.jpg. So it it not necessary for each directory of page to have its own css file or images.

Hope this clears it up a bit.

edit: index.html is only required if you do not specify a specific file in the url. For example does not specify a file, so it will look for a index.html file. where as does specify a file (the contact.html part), so that file will be loaded

Edit 2: If you are making different websites, make sure your hosting service can mange this. All that you need to do then is make a different directory for each website and have the whole website structure in that directory.
0 Cooper Cecil · August 14, 2014
Thank you for the detailed explanations. It does help to clear it up. I guess it will sink in as I go along, I am sure it will become more obvious. 

Thanks again!

+2 Steve Myers · August 14, 2014
Couldn't you just create a different folder, or subfolder, for each site? Forgive me if I'm wrong, I just finished the XHTML tutorials this week, but in general you can save files with the same name, as long as they aren't saved in the same place.

For instance, can't you create a folder called "Websites," then a bunch of subfolders for each site; ie: "Site 1," "Site 2," etc... with each index file in the Site folder it belongs to?

--Edited for grammarz--
0 Ethan Fraser · August 15, 2014
I'm not sure how detailed the explanation between a website and a webpage above is but it's essentially as simple as a webpage is just a single HTML file but a website is often a folder that contains one or more HTML pages, CSS pages and/or JavaScript pages (let's not forget things like PHP files, ASP files and many more). The main page of your website is often the index.html as that's the page the website loads first. I highly discourage making a website with any fewer than 2 HTML pages and less than 1 CSS file. A second piece of advice is always create a separate folder for each website.
  • 1

HTML / CSS / Web Design


Discuss, share, ask, learn and teach HTML5 and CSS3.