<p>You could always use a meta refresh</p>

<pre><code>&lt;meta http-equiv="refresh" content="5; url=http://example.com/"&gt;
</code></pre>

<p>With the number being the amount of time in seconds until the redirect</p>

CC BY-SA 3.0
2014-12-13T00:03:33.340Z
damn off course!
Johannes Lamers
CC BY-SA 3.0
2015-11-24T15:34:46.533Z
pay attention that the tag is broken: it should be content="5;url='whatever'"
Masiorama
CC BY-SA 3.0
2015-11-24T15:38:55.277Z
good catch, feel free to edit answers when you see these errors :)
Alec Ritson
CC BY-SA 3.0
2014-12-13T00:00:27.687Z
2015-11-24T15:38:34.900Z
2015-11-24T15:38:34.900Z
Alec Ritson
<p>Is it possible to set up a 404 page, and after x amount of time redirecting to the homepage?</p>

<pre><code>{% extends "_layout/_layout" %}


{% set metaTitle = "404" %}


{% set bodyId           = "404" %}
{% set bodyClass        = "404" %}

{% block content %}
    &lt;section class="container"&gt;
        &lt;h1&gt;Page not found&lt;/h1&gt;

        &lt;p&gt;What’s worse, a hilarious 404 page can’t be found either.&lt;/p&gt;
    &lt;/section&gt;


    &lt;!--404 Tracking Google--&gt;
&lt;script type="text/javascript"&gt;// &lt;![CDATA[
    if (document.title.search(/404/i) !== -1) {
    _gaq.push(['_trackEvent', 'Error', '404', 'page: ' + document.location.pathname + document.location.search + ' ref: ' + document.referrer,,true]);
     }; 
    // ]]&gt;

&lt;/script&gt;
{% endblock %}
</code></pre>

<redirect><404><error>
404 page redirect to homepage
# 404 page redirect to homepage

(Asked by: username_0 on 2014-12-12)

Is it possible to set up a 404 page, and after x amount of time redirecting to the homepage?
{% extends "_layout/_layout" %}


{% set metaTitle = "404" %}


{% set bodyId           = "404" %}
{% set bodyClass        = "404" %}

{% block content %}
    
        Page not found

        What’s worse, a hilarious 404 page can’t be found either.
    


    

{% endblock %}

**Tags:** redirect, 404, error


---

## 1 answers

### Answer by username_1 on 2014-12-13. Score: 2 | Accepted answer

You could always use a meta refresh


With the number being the amount of time in seconds until the redirect

> **Comments:**
> **username_0**: damn off course!  
> **username_2**: pay attention that the tag is broken: it should be content="5;url='whatever'"  
> **username_1**: good catch, feel free to edit answers when you see these errors :)  

---

