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
Zackary Given
691 PointsWebsite 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
Shawn Flanigan
Courses Plus Student 15,815 PointsZackary,
Is your page named index.html?
Zackary Given
691 Pointsthanks I've been trying to figure out the problem, it was because my page was Index.html instead of index.html
Shawn Flanigan
Courses Plus Student 15,815 PointsShawn Flanigan
Courses Plus Student 15,815 PointsWhen 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.