What is index.html?
In short
- index.html is the page a web server sends when someone visits a site's address without naming a file.
- Every static site needs one, because it's the front door visitors arrive at.
- On NudgeHost, a ZIP with an index.html becomes a live site, and a ZIP without one stays a file to download.
index.html is the default page of a website. When someone visits an address that ends in a folder, such as example.com or example.com/docs/, the server looks inside that folder for a file called index.html and sends it. That's why a home page rarely shows its file name in the address bar. Web servers and static hosts have followed this convention for decades, so any site built from plain files keeps its front page in this file.
When you upload a zipped website, NudgeHost looks through the archive for index.html. If everything sits inside one folder, it looks inside that folder. The index.html nearest the top becomes the front page, and the match ignores capital letters, so Index.html counts. If two sit at the same level, as the src and dist folders do in a CodePen export, the one in a dist, build or out folder wins. A file named index.htm doesn't count.
A ZIP with no index.html still uploads, but it's shared as a file to download instead of served as a site. In an app with its own routes, the same file answers every route that has no page of its own, so the app's router can draw the right screen. NudgeHost's free plan keeps up to 10 links live with no end date.
Related terms
Frequently asked questions
Does index.html have to be lowercase?
Not on NudgeHost, which matches the name whatever its capitals. Other hosts can be stricter, so lowercase is the safe habit.
Can a site work without an index.html?
Only if visitors type the exact name of another page. Without an index.html there's nothing to show at the site's own address, which is why NudgeHost shares a ZIP without one as a file to download.
What if my ZIP has more than one index.html?
The one nearest the top of the archive is the front page, and the others stay reachable at their own paths. If two sit at the same depth, NudgeHost prefers the one in a dist, build or out folder.
Put it into practice.
Drop a file and get a shareable link in seconds. Free, no card needed.