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 trialRachel Preston
1,316 Points404 Not Found for Contact Page
I have created the contact.html file and copied the same code from my about file to the contact one and am now receiving a 404 error when I attempt to preview the page. I reviewed the code nothing is standing out to me. I checked for spelling errors between the names of my files and the code. Any ideas?
<html>
<head>
<meta charset="utf-8">
<title>R.L. Preston | Alien</title>
<link rel="stylesheet" href="css/normalize.css">
<link href='http://fonts.googleapis.com/css?family=Philosopher|Open+Sans:400italic,700italic,400,700,800' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="css/main.css">
</head>
<body>
<header>
<a href="index.html" id="logo">
<h1>R.L. Preston</h1>
<h2>Alien</h2>
</a>
<nav>
<ul>
<li><a href="index.html">Portfolio</a></li>
<li><a href="about.html">About</a></li>
<li><a href="contact.html" class="selected">Contact</a></li>
</ul>
</nav>
</header>
<div id="wrapper">
<section>
<img src="img/flower.JPG" alt="Photo of aliens" class="profile-photo">
<h3>About</h3>
<p>Bleep bloob bloop</p>
<p>Dont follow me im terrible but if you must <a href="http://Twitter.com/punkerbelle">@punkerbelle</a></p>
</section>
<footer>
<a href="http://Twitter.com/punkerbelle"><img src="img/twitter-wrap.png" alt="Twitter Logo" class="social-icon"></a>
<a href="http://Facebook.com"><img src="img/facebook-wrap.png" alt="Facebook Logo" class="social-icon"></a>
<p>© 2014 R.L. Preston</p>
</footer>
</div>
</body>
</html>
8 Answers
Lucille daCosta
2,286 PointsI found my '404 not found' solution. Check your index.html page and make sure the 'contact' page has the .html after it--That was my problem! It was missing from index page! Lu
Marlon Henry
6,885 PointsOnly way <li><a href="contact.html" class="selected">Contact</a></li> would give you a 404 is if you have the name misspelled in the file or it's not in the same folder location as this code file.
Rachel Preston
1,316 PointsI have checked the spelling multiple times. No capital letters in the file name or the actual code. The file is in my directory structure as 'contact.html' in between the 'about.html' file and 'index.html' file. I have tried to move the files to appear in the same order as they do in the videos but that doesn't seem to be possible. When I am in the 'contact.html' file and I go to view and click Show in File Tree the file text in the sidebar labeled 'contact.html' turns white.
Lucille daCosta
2,286 PointsI am having the same exact problem! I tried recreating twice and it just won't work. 404 Not found. nginx/1.6.2 There is also a white line around 'contact' when I hover. But not always. Very odd. Any solutions yet? Thanks, Lu
Rachel Preston
1,316 PointsWoah I have been so busy this week I haven't had a chance to check this forum out. I just checked to make sure that I had the .html after contact in my index.html page and I did indeed. For grins I clicked on the preview and went to my contact page and it is now ((magically)) working! I have no idea how or why because I haven't had a chance to log on since my last response when I was still experiencing the error. Well however thanks to those who responded!
Simon Tyrrell
690 PointsI was having this same problem. My friend showed me that if I did a full refresh (ctrl + f5 instead of just f5) the page would give you the completeley refreshed version of the page, something to do with the the site being saved in the cache or something and remedying this problem was to full refresh.
MUZ140064 Onias Muchabaiwa
5,981 Pointsam having the same problm guyz what shld i do because the contact page is not displaying its saying 404 not found
Rachel Preston
1,316 PointsWhat seems to be the most common issue that results in the 404 error is spelling so take a look at your contact.html page and your index.html page and make sure there is no spelling errors there. I checked mine over and over again and found no spelling errors and was still receiving the 404 error. I honestly waited about a week and then just chose to continue the lesson without the proper preview. Eventually the page finally starting showing up in the previews. I have no idea why I just went with it. I would say that giving Simon's comment a try might work? I never got the chance to try it out before the page started actually showing up.
Umar A
4,041 PointsUmar A
4,041 PointsHi Rachel,
I copied your code into workspaces and it worked! Try creating a new page and see what happens.