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

Link to Index.html not working

When I click the link to the index.html page I get this:

"Not Found

The requested URL /index.html was not found on this server."

The index.html file is in my workspace and not in any folder. This is the same way I've done it in the courses but something isn't working now that I'm using my own workspace.

<html>
  <head>
    <title>Tortoise and Hare Racing</title>
  </head>
<body>
  <header>
    <a><h1>Tortoise and Hare Racing</h1></a>
    <h2>The Next Level of Race Timing</h2>
  </header>
  <nav><ul>
  <li><a href="index.html">Home</a></li>
   <li><a href="index.html">Equipment</a></li>
   <li> <a href="index.html">Experience</a></li> 
   <li><a href="index.html">Upcoming Events</a></li>
   <li><a href="index.html">Find Your Time</a></li>
   <li><a href="index.html">Contact Us</a></li>
    </ul>
  </nav>
  <section>
  Welcome to our organization where we strive to provide a professional and unforgetable experience for racers and event organizers. 
  </section>
  </body>
</html>

4 Answers

Hi Chris, Index.html is your main page or call it home page. It looks like you are linking all pages as home page to home page. Try diff names for diff pages.

<nav><ul>
  <li><a href="index.html">Home</a></li>
   <li><a href="Equipment.html">Equipment</a></li>
   <li> <a href="Experienc.html">Experience</a></li> 
   <li><a href="Upcoming Events.html">Upcoming Events</a></li>
   <li><a href="Find Your Time.html">Find Your Time</a></li>
   <li><a href="Contact Us.html">Contact Us</a></li>
    </ul>
  </nav>

Hi Ellie, I realized that every link was linked to my index.html. The problem was that when I click on any link I would get an error instead of redirecting my to the correct page.

"Not Found

The requested URL /index.html was not found on this server."

I recommend not using captial letters and whitespace in file names. If you always use lower cases you don't have to remember whether you used a capital letter or not. This will definetly save you some trouble finding errors in your code..

Sorry for smartassing :D

I just give him example to use diff name. Ofcourse he can't use capital letters and spaces.

You can refresh the browser or some time I open new document and copy my code there. Sometime there are bugs we can't see them. :)