Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

CSS How to Make a Website Beginning HTML and CSS Follow Along with Workspaces

When I click the preview it just brings up a page that says "Index of /" then it will say "index.html below it

If I click on the index.html button then it shows my name!

Mitchell Springer
Mitchell Springer
2,576 Points

Copy and paste in your code from index.html. There may be something missing that is causing the error.

Hey Mitchell,

Anytime a directory listing pops up, it's because the server couldn't find an "index.*" file. Generally, servers start with "index.html" and then go through various extensions such as ".xhtml, .php, etc." It's what happened in this case, as Katy said.

2 Answers

Hey Katy,

Make sure that the "index.html" file is exactly named like that. The server looks for a file named "index.html" and if it doesn't find it, that's when it brings up the directory listing.

oh snap, I gotta start paying attention, I had it spelled "Index.html" with a capital "I" oops

Thank you

You're welcome! If you want to go ahead and mark my answer as best answer, we can mark this as resolved! :)