Set a website’s homepage

Level: beginner

This was the weirdest, easiest, hardest thing to learn when I started making websites. And if you don’t read the right books or know where to look, it’s something you probably won’t just figure out on your own either. Somehow, a lot of books and tutorials gloss over this tiny detail thinking it goes without saying. So, how do you set your website’s homepage? How do you change what gets shown as your website’s homepage?

It actually IS really, really super simple.

Here’s how it went for me

When I was making my first website: I wrote out all the html and a few css styles for a new webpage; something like I saved it and name it myawesomepunkband.html because I knew that websites end with .html. Now I wanted to get my new webpage live on the web. I login to my webserver via ftp (you could also access your webserver via the command line) and uploaded the file. I typed out the domain in a browser to see my new webpage in all it’s glory. But there was nothing there. Wtf? The internet is broken. Alert the CIA!!

Nope, the internet wasn’t broken. I just named my file wrong.

The html file you want to be your homepage, should be named index.html. That’s it. Seriously, that’s it.

Here’s the gist of it
A website is just a collection of files and folders, just like files and folders on your computer. The only difference is that the files are on a webserver and that webserver knows how to serve your files up to the internet. And by default, it’s configured so that any file named index.html (or .php, .asp, or whatever) is the homepage. So when you visit you’re getting the file named index.php.

See, I told you it was super simple easy. Almost so easy that it’s not event worth writing a post about. But then I’d be just like all those others that miss the “easy” details that are often the most important to new web developers.

What are some “easy” things that you’ve struggled with (or are struggling with) when you first got started making websites.

Leave a Reply

Your email address will not be published. Required fields are marked *