# Howto replace pagination "refresh" with 301 redirect?

**URL:** <https://discourse.gohugo.io/t/howto-replace-pagination-refresh-with-301-redirect/25435>\
**Category:** support\
**Tags:** pagination\
**Created:** [May 12, 2020, 8:12am UTC](https://discourse.gohugo.io/t/howto-replace-pagination-refresh-with-301-redirect/25435 "2020-05-12T08:12:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Daniel\_Muller](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/daniel_muller/32/10772_2.png) [@Daniel\_Muller](https://discourse.gohugo.io/u/Daniel_Muller)\
**Post date:** [May 12, 2020, 8:12am UTC](https://discourse.gohugo.io/t/howto-replace-pagination-refresh-with-301-redirect/25435/1 "2020-05-12T08:12:47Z")

</div>

When building a site, the summary shows “52 Aliases” created. This 52 aliases are all pagination (page 1) http-equiv=“refresh” type of aliases.

I am unable to disable them with “disableAliases”. I am unable to list them with .Site.Pages.Aliases

Is there another way to get a list of this type of aliases? For now, I am fetching them with the help of  
“grep -r” in bash.

My goal is to identify them and add them to a 301 redirect list

Thanks,  
Daniel

---

<div class="post-metadata">

**Author:** ![maiki](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/maiki/32/16384_2.png) [@maiki](https://discourse.gohugo.io/u/maiki)\
**Post date:** [May 12, 2020, 9:05am UTC](https://discourse.gohugo.io/t/howto-replace-pagination-refresh-with-301-redirect/25435/2 "2020-05-12T09:05:10Z")

</div>

> [@INFO Alias messages, but I'm not using Aliases](https://discourse.gohugo.io/t/info-alias-messages-but-im-not-using-aliases/6460/4):
>
> We create an alias for page 1 to enable “endless scrolling” via javascript.

I’m not sure if it picks up paginated aliases, but you can try to shortcode at:

> [@Aliases listed in output, but not used in project](https://discourse.gohugo.io/t/aliases-listed-in-output-but-not-used-in-project/22128/6):
>
> Yeah, I got that from the topic. What I’m suggesting is a way to directly see what they are, to help you debug. nerd In case others find their aliases ponderous, here’s a shortcode for ya; copy to layouts/shortcodes/whatthealiases.html: {{ range $p := .Site.Pages -}} \<pre\> \<code\> {{ range .Aliases }} {{ . | printf "%-35s" }} {{ $p.RelPermalink -}} {{ end -}} \</code\> \</pre\> {{- end -}} That’s the code from [https://gohugo.io/news/http2-server-push-in-hugo/](https://gohugo.io/news/http2-server-push-in-hugo/), with some formatting for …

---

<div class="post-metadata">

**Author:** ![Daniel\_Muller](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/daniel_muller/32/10772_2.png) [@Daniel\_Muller](https://discourse.gohugo.io/u/Daniel_Muller)\
**Post date:** [May 12, 2020, 3:35pm UTC](https://discourse.gohugo.io/t/howto-replace-pagination-refresh-with-301-redirect/25435/3 "2020-05-12T15:35:15Z")

</div>

I tried looping through _.Site.Pages_. Only Kinds of _pages_, _taxonomy_, _taxonomyTerm_ and _section_ are populated in _.Site.Pages_.

It seems that paginated lists aren’t pages per-say, and more specially aren’t really considered aliases (except during the build summary output).

Unless there is a .Site.AllPagers variables, I don’t think I can achieve what I want.

Using _http-equiv=“refresh”_ isn’t that bad, I just prefer a 301 than a 200. Running a script before deploy isn’t an issue either, just an annoying extra step.

If someone has another idea, suggestions welcome 😉

Thanks
