Craft CMS Stack Exchange is a question and answer site for administrators, end users, developers and designers for Craft CMS. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When users enter I would like to redirect them to the template.

How could I achieve this?

share|improve this question
Do you mean proper redirecting? Or do you only want that news channel index template to be you home page? – carlcs Aug 15 '14 at 13:38
I want the news channel to be my homepage. If possible redirect to the latest post in the news page. – shanti Aug 15 '14 at 13:40
"I want the news channel to be my homepage" is not that what you get with the {% redirect %} tag. No visitor would be on – carlcs Aug 15 '14 at 14:29
up vote 7 down vote accepted

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 %}
share|improve this answer

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 instead of never really landing there.

You'd possibly even confuse some visitors, if they get redirected to 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!

share|improve this answer
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 Aug 18 '14 at 9:34
Right. Thanks for adding this here, @jnowland! – carlcs Aug 18 '14 at 9:36


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


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?"

If you simply want to redirect the visitors to, there's a {% redirect %} tag available for such redirects.

share|improve this answer

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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.