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

Website only goes to index and not the webpage

When i preview my site it doesn't go to the actual page it only goes to the index with all of the different pages of my code. How do i fix this problem?

2 Answers

Zackary,

Is your page named index.html?

When you go to an address that doesn't include a specific filename (like example.com instead of example.com/page.html), the server looks for a few default files...usually index.html or index.php...and displays that default file in your browser. If none of these default files exist, it just shows you a directory of the files in that folder. So, in general, unless you've done some advanced magic on your .htaccess file, you'll want your home page to be named index.html. Otherwise, you'll see exactly what you're seeing now.

thanks I've been trying to figure out the problem, it was because my page was Index.html instead of index.html