<p>I resolved this by adding a new 'home' template which extends my main layout. This resolved the 404 in the header status code.</p>

CC BY-SA 3.0
2016-07-28T16:41:00.893Z
2016-07-28T16:41:00.893Z
Alex Mejias
<p>I have a Craft site which seems to function properly but I see a 404 in the header http status code. I’ve located the following in the error logs:</p>

<pre><code>2016/07/28 15:22:30 [error] [exception.Craft\HttpException.404] exception 'Craft\HttpException' in   /var/www/touchtunesmedia.com/craft/app/controllers/Templat$
Stack trace:
#0 [internal function]: Craft\TemplatesController-&gt;actionRender('home', Array)
#1 /var/www/touchtunesmedia.com/craft/app/framework/web/actions/CAction.php(109): ReflectionMethod-&gt;invokeArgs(Object(Craft\TemplatesController), Array)
#2 /var/www/touchtunesmedia.com/craft/app/framework/web/actions/CInlineAction.php(47): CAction-&gt;runWithParamsInternal(Object(Craft\TemplatesController), Obje$
#3 /var/www/touchtunesmedia.com/craft/app/framework/web/CController.php(308): CInlineAction-&gt;runWithParams(Array)
#4 /var/www/touchtunesmedia.com/craft/app/framework/web/CController.php(286): CController-&gt;runAction(Object(CInlineAction))
#5 /var/www/touchtunesmedia.com/craft/app/framework/web/CController.php(265): CController-&gt;runActionWithFilters(Object(CInlineAction), Array)
#6 /var/www/touchtunesmedia.com/craft/app/framework/web/CWebApplication.php(282): CController-&gt;run('render')
#7 /var/www/touchtunesmedia.com/craft/app/framework/web/CWebApplication.php(141): CWebApplication-&gt;runController('templates/rende...')
#8 /var/www/touchtunesmedia.com/craft/app/etc/web/WebApp.php(288): CWebApplication-&gt;processRequest()
#9 /var/www/touchtunesmedia.com/craft/app/framework/base/CApplication.php(185): Craft\WebApp-&gt;processRequest()
#10 /var/www/touchtunesmedia.com/craft/app/index.php(62): CApplication-&gt;run()
#11 /var/www/touchtunesmedia.com/public/index.php(19): require_once('/var/www/toucht...')
#12 {main}
REQUEST_URI=/
</code></pre>

<p>I have a home partial which is rendering fine so I’m having a hard time diagnosing where the error may be stemming from. Additionally everything returns a 200 status code in my network profiler other than the request for the document. </p>

<p><a href="https://i.sstatic.net/vnFHg.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/vnFHg.png" alt="enter image description here"></a></p>

<p>If I change the public dir’s index.php to echo test there is no 404 in the header status code. If I change my main layout template to a basic html file with nothing in it I get a 404 in the status code.</p>

<404>
404 in HTTP Header on working site
# 404 in HTTP Header on working site

(Asked by: username_0 on 2016-07-28)

I have a Craft site which seems to function properly but I see a 404 in the header http status code. I’ve located the following in the error logs:
2016/07/28 15:22:30 [error] [exception.Craft\HttpException.404] exception 'Craft\HttpException' in   /var/www/touchtunesmedia.com/craft/app/controllers/Templat$
Stack trace:
#0 [internal function]: Craft\TemplatesController->actionRender('home', Array)
#1 /var/www/touchtunesmedia.com/craft/app/framework/web/actions/CAction.php(109): ReflectionMethod->invokeArgs(Object(Craft\TemplatesController), Array)
#2 /var/www/touchtunesmedia.com/craft/app/framework/web/actions/CInlineAction.php(47): CAction->runWithParamsInternal(Object(Craft\TemplatesController), Obje$
#3 /var/www/touchtunesmedia.com/craft/app/framework/web/CController.php(308): CInlineAction->runWithParams(Array)
#4 /var/www/touchtunesmedia.com/craft/app/framework/web/CController.php(286): CController->runAction(Object(CInlineAction))
#5 /var/www/touchtunesmedia.com/craft/app/framework/web/CController.php(265): CController->runActionWithFilters(Object(CInlineAction), Array)
#6 /var/www/touchtunesmedia.com/craft/app/framework/web/CWebApplication.php(282): CController->run('render')
#7 /var/www/touchtunesmedia.com/craft/app/framework/web/CWebApplication.php(141): CWebApplication->runController('templates/rende...')
#8 /var/www/touchtunesmedia.com/craft/app/etc/web/WebApp.php(288): CWebApplication->processRequest()
#9 /var/www/touchtunesmedia.com/craft/app/framework/base/CApplication.php(185): Craft\WebApp->processRequest()
#10 /var/www/touchtunesmedia.com/craft/app/index.php(62): CApplication->run()
#11 /var/www/touchtunesmedia.com/public/index.php(19): require_once('/var/www/toucht...')
#12 {main}
REQUEST_URI=/

I have a home partial which is rendering fine so I’m having a hard time diagnosing where the error may be stemming from. Additionally everything returns a 200 status code in my network profiler other than the request for the document. 

If I change the public dir’s index.php to echo test there is no 404 in the header status code. If I change my main layout template to a basic html file with nothing in it I get a 404 in the status code.

**Tags:** 404


---

## 1 answers

### Answer by username_0 on 2016-07-28. Score: 2

I resolved this by adding a new 'home' template which extends my main layout. This resolved the 404 in the header status code.


---

