<p>If you want one of your <em>channel entries</em> to be the homepage, simply include the channel entries' template to your home page <code>index.html</code>:</p>

<pre><code>{# Set the `entry` variable manually #}
{% set entry = craft.entries.section('news').first() %}

{# Load the channel entry template #}
{% include "news/_entry" %}
</code></pre>

<p>With this setup, your visitors would actually be on your homepage's URL <code>http://www.example.com</code> instead of never really landing there.</p>

<p>You'd possibly even confuse some visitors, if they get redirected to <code>http://www.example.com/news/my-not-so-very-long-news-title</code> straight away and they might search for your proper home page?!</p>

<p>I'm not sure at all, but I can imagine a regularly changing redirect (each time you add a new news post you'd also have a new home URL!) could also by problematic for SEO rankings. Please correct me if I'm wrong with that! </p>

CC BY-SA 3.0
2014-08-18T09:34:15.920Z
Using this technique you would want to set a canonical url to the sections entry url so google didn't see duplicate content on your homepage AND the news entry page.
jnowland
CC BY-SA 3.0
2014-08-18T09:36:02.650Z
Right. Thanks for adding this here, @jnowland!
carlcs
CC BY-SA 3.0
2014-08-15T14:58:32.867Z
2014-08-15T15:06:39.180Z
2014-08-15T15:06:39.180Z
carlcs
<p><em>EDIT:</em></p>

<p><em>This answer was given when it wasn't yet clear that @shanti wants one of the channel entries to become the home page. The following is only relevant, if you want a channel's index page to be available under <code>http://www.example.com</code>.</em></p>

<p>.</p>

<p>I'd recommend you to add a single section to your configuration as the entry for your channel's index. In this single's settings you select the template you currently use and you have a checkbox to make this single entry your home page!</p>

<p>Another idea would be to use one structure section for all <em>singular content pages</em> (e.g. about, contact, etc.) and all your channel <em>index pages</em> (e.g. projects, news). There are other interesting Q/As here on Stack Exchange on that topic. If you're going that way, have a look at the answers on <a href="https://craftcms.stackexchange.com/q/1467/125">"Add home page to a structure?"</a></p>

<p>If you simply want to redirect the visitors to <code>http://www.example.com/news</code>, there's a <a href="http://buildwithcraft.com/docs/templating/redirect" rel="nofollow noreferrer"><code>{% redirect %}</code></a> tag available for such redirects.</p>

CC BY-SA 3.0
2014-08-15T13:52:30.437Z
2014-08-15T17:13:46.617Z
2017-04-13T12:50:59.930Z
carlcs
<p>Another approach if you simply want to use a channel as your homepage (rather than redirecting) is to just make your homepage extend the channel's index template. For example, set your homepage template to:</p>

<pre><code>{% extends "news/index" %}
</code></pre>

<p>...and the News channel will appear on your homepage.</p>

CC BY-SA 3.0
2015-04-15T12:10:14.337Z
2015-04-15T12:10:14.337Z
Nick F
<p>You can do this with Craft’s <a href="http://buildwithcraft.com/docs/templating/redirect">{% redirect %}</a> tag. Just put this in your /index.html template:</p>



<pre class="lang-twig prettyprint-override"><code>{% redirect 'news' %}
</code></pre>

<p>If you want to redirect to the latest entry in your News section, as you mentioned in the comments above, just fetch the entry first:</p>

<pre class="lang-twig prettyprint-override"><code>{% set latestNews = craft.entries.section('news').order('postDate desc').first() %}
{% redirect latestNews.url %}
</code></pre>

CC BY-SA 3.0
2014-08-15T13:54:23.367Z
2014-08-15T13:54:23.367Z
Brandon Kelly
<p>When users enter <a href="http://www.example.com" rel="nofollow">http://www.example.com</a> I would like to redirect them to the <a href="http://www.example.com/news" rel="nofollow">http://www.example.com/news</a> template. </p>

<p>How could I achieve this?</p>

CC BY-SA 3.0
2014-08-15T13:38:49.413Z
Do you mean proper redirecting? Or do you only want that news channel index template to be you home page?
carlcs
CC BY-SA 3.0
2014-08-15T13:40:20.353Z
I want the news channel to be my homepage. If possible redirect to the latest post in the news page.
Maria Stellini
CC BY-SA 3.0
2014-08-15T14:29:43.567Z
"I want the news channel to be my homepage" is not that what you get with the `{% redirect %}` tag. No visitor would be on `http://www.example.com`.
carlcs
<routing>
How to set a channel as the homepage
# How to set a channel as the homepage

(Asked by: username_0 on 2014-08-15)

When users enter <http://www.example.com> I would like to redirect them to the <http://www.example.com/news> template.

How could I achieve this?

**Tags:** routing
> **Comments:**
> **username_1**: Do you mean proper redirecting? Or do you only want that news channel index template to be you home page?  
> **username_0**: I want the news channel to be my homepage. If possible redirect to the latest post in the news page.  
> **username_1**: "I want the news channel to be my homepage" is not that what you get with the `{% redirect %}` tag. No visitor would be on `http://www.example.com`.  

---

## 4 answers

### Answer by username_4 on 2014-08-15. Score: 8 | Accepted answer

You can do this with Craft’s {% redirect %} tag. Just put this in your /index.html template:
{% redirect 'news' %}

If you want to redirect to the latest entry in your News section, as you mentioned in the comments above, just fetch the entry first:
{% set latestNews = craft.entries.section('news').order('postDate desc').first() %}
{% redirect latestNews.url %}


---

### Answer by username_1 on 2014-08-15. Score: 4

If you want one of your channel entries to be the homepage, simply include the channel entries' template to your home page index.html:
{# Set the `entry` variable manually #}
{% set entry = craft.entries.section('news').first() %}

{# Load the channel entry template #}
{% include "news/_entry" %}

With this setup, your visitors would actually be on your homepage's URL http://www.example.com instead of never really landing there.
You'd possibly even confuse some visitors, if they get redirected to http://www.example.com/news/my-not-so-very-long-news-title straight away and they might search for your proper home page?!
I'm not sure at all, but I can imagine a regularly changing redirect (each time you add a new news post you'd also have a new home URL!) could also by problematic for SEO rankings. Please correct me if I'm wrong with that!

> **Comments:**
> **username_2**: Using this technique you would want to set a canonical url to the sections entry url so google didn't see duplicate content on your homepage AND the news entry page.  
> **username_1**: Right. Thanks for adding this here, @jnowland!  

---

### Answer by username_1 on 2014-08-15. Score: 3

*EDIT:*

*This answer was given when it wasn't yet clear that @shanti wants one of the channel entries to become the home page. The following is only relevant, if you want a channel's index page to be available under `http://www.example.com`.*

.

I'd recommend you to add a single section to your configuration as the entry for your channel's index. In this single's settings you select the template you currently use and you have a checkbox to make this single entry your home page!

Another idea would be to use one structure section for all *singular content pages* (e.g. about, contact, etc.) and all your channel *index pages* (e.g. projects, news). There are other interesting Q/As here on Stack Exchange on that topic. If you're going that way, have a look at the answers on ["Add home page to a structure?"](https://craftcms.stackexchange.com/q/1467/125)

If you simply want to redirect the visitors to `http://www.example.com/news`, there's a [`{% redirect %}`](http://buildwithcraft.com/docs/templating/redirect) tag available for such redirects.


---

### Answer by username_3 on 2015-04-15. Score: 2

Another approach if you simply want to use a channel as your homepage (rather than redirecting) is to just make your homepage extend the channel's index template. For example, set your homepage template to:
{% extends "news/index" %}

...and the News channel will appear on your homepage.


---

