# Using different templates for "/" and "/page/1"

**URL:** <https://discourse.gohugo.io/t/using-different-templates-for-and-page-1/45104>\
**Category:** support\
**Tags:** pagination\
**Created:** [July 2, 2023, 9:14am UTC](https://discourse.gohugo.io/t/using-different-templates-for-and-page-1/45104 "2023-07-02T09:14:57Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![mpRegalado](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/mpregalado/32/18321_2.png) [@mpRegalado](https://discourse.gohugo.io/u/mpRegalado)\
**Post date:** [July 2, 2023, 9:14am UTC](https://discourse.gohugo.io/t/using-different-templates-for-and-page-1/45104/1 "2023-07-02T09:14:57Z")

</div>

I’m working on a site where the posts would be stored in different categories, and the main page is used to display a combined chronological list of all my posts using pagination.

However, I would like to make it so the landing page does not show any posts at all, showing a static message instead.

Playing around I see that defining a `home.html` and `list.html` templates makes it so `foo.bar/` shows the content in `home.html` and `foo.bar/page/2` shows the content in `list.html`. Which is almost what I would want to see except that doing this means I lose the first page of posts since `foo.bar/page/1` redirects to `foo.bar/` showing the home template.

Is there any way to configure a Hugo theme so it does not perform that redirection?

---

<div class="post-metadata">

**Author:** ![ju52](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/ju52/32/6749_2.png) [@ju52](https://discourse.gohugo.io/u/ju52)\
**Post date:** [July 2, 2023, 12:02pm UTC](https://discourse.gohugo.io/t/using-different-templates-for-and-page-1/45104/2 "2023-07-02T12:02:06Z")

</div>

only my first guess

move home.html to layouts\_default

also you can create content/\_index.md too, where you put home page content in

HTH

---

<div class="post-metadata">

**Author:** ![jmooring](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/jmooring/32/4214_2.png) [@jmooring](https://discourse.gohugo.io/u/jmooring)\
**Post date:** [July 2, 2023, 5:28pm UTC](https://discourse.gohugo.io/t/using-different-templates-for-and-page-1/45104/3 "2023-07-02T17:28:40Z")

</div>

> [@mpRegalado](#):
>
> the main page is used to display a combined chronological list

> [@mpRegalado](#):
>
> the landing page does not show any posts at all

If the “landing” page is the same as the “main” page, your requirements seem contradictory. You can elaborate?

---

<div class="post-metadata">

**Author:** ![mpRegalado](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/mpregalado/32/18321_2.png) [@mpRegalado](https://discourse.gohugo.io/u/mpRegalado)\
**Post date:** [July 9, 2023, 1:15pm UTC](https://discourse.gohugo.io/t/using-different-templates-for-and-page-1/45104/4 "2023-07-09T13:15:48Z")

</div>

The landing page and the main page are the same yes.  
When I mention that it is used to display a combined chronological list I mean to say that I wish to change that behavior, so the main page does not show any content related to posts at all, but still have a way to use the home’s list template to show a list of posts under a different url.

A solution would be converting all my sections into subsections, but that carries its own set of problems so that’s why I was wondering if there is another way.

---

<div class="post-metadata">

**Author:** ![jmooring](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/jmooring/32/4214_2.png) [@jmooring](https://discourse.gohugo.io/u/jmooring)\
**Post date:** [July 9, 2023, 3:21pm UTC](https://discourse.gohugo.io/t/using-different-templates-for-and-page-1/45104/5 "2023-07-09T15:21:31Z")

</div>

Try this:

```plaintext
git clone --single-branch -b hugo-forum-topic-45104 https://github.com/jmooring/hugo-testing hugo-forum-topic-45104
cd hugo-forum-topic-45104
hugo server

```

The home page displays the content from `content/_index.md` using `layouts/_default/home.html`.

A paginated list of posts in reverse chronological order is available at `http://localhost:1313/posts/` using `layouts/_default/list.html`.

What is different about your site?
