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

HTML How to Make a Website Adding Pages to a Website Add a New Page

issue with "preview workspace"

When I click on the "eye" - preview workspace, it doesn't send me straight to the website, but to a page showing "INDEX OF/" on the top. Below, the files I'm working on are shown, so in order to view the website, I need to click on the file "index.html" Could somebody tell me how to make the website appear after clicking on "preview workspace"?

10 Answers

Thank you Jeremy! The problem turned out to be the capital INDEX.HTML file name. So after I decapitalized it, everything is good.

jeremy rackley
jeremy rackley
22,336 Points

Have you made sure that you have linked them with your anchor tags? example <nav> <ul> <li><a href ="about.html">About</a></li> <li><a href ="contact.html">Contact</a></li> </ul> </nav> They need to be linked like this on all pages.

jeremy rackley
jeremy rackley
22,336 Points

If you are seeing index of then this means you are using a localhost server. Which course are you working on where it is showing you this?

I'm currently working on WebDesign.

jeremy rackley
jeremy rackley
22,336 Points

With web design there is no need to run a local server all you need to do is open the index.html file in the browser. So if you are running lamp or wamp or xamp or anything make sure you turn them off. This should help? You only need to run a local server when using a server side language..

jeremy rackley
jeremy rackley
22,336 Points

Also another thing that could be causing this for you is if you saved your files into your www or htdocs folder.

Thank you Jeremy for taking the time! Well, since I haven't heard of "lamp", "wamp", "xamp" - my guess is that I don't run any of them. Regarding saving the files, I haven' done any additional saving other than the workspace.

jeremy rackley
jeremy rackley
22,336 Points

No problem, unless I can not think properly right now though this is an issue with it being on a localhost server. Do you have sublime text? If not I highly recommend it, what you can do is copy the files from the workspace into sublime text or any editor(notepad) and the open the index.html file from wherever you save it to. However as long as you can still acccess your work it is not a big deal to open them from the index, just an extra step and little bit of a headache! Could just be a glitch with the course you are doing at the moment.

In general, the issue doesn't bother me. However, when I start creating pages of the website, they all are not functional when I click on them. The only way to access them is from the workspace button ( after selecting the certain file: index or about or contactus)

jeremy rackley
jeremy rackley
22,336 Points
<nav>
<ul>
<li><a href="about.html">About</a></li>
<li><a href="contact.html">Contact</a></li>
</ul>
</nav>

Sorry forgot the back ticks for the code to show

jeremy rackley
jeremy rackley
22,336 Points

AHH! Good job getting it figured out and best of luck with continuing! If you need any help with anything else let me know.