# Redirect loop in an alias?

**URL:** <https://discourse.gohugo.io/t/redirect-loop-in-an-alias/25854>\
**Category:** support\
**Created:** [May 27, 2020, 1:42am UTC](https://discourse.gohugo.io/t/redirect-loop-in-an-alias/25854 "2020-05-27T01:42:16Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![short](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/short/32/11382_2.png) [@short](https://discourse.gohugo.io/u/short)\
**Post date:** [May 27, 2020, 1:42am UTC](https://discourse.gohugo.io/t/redirect-loop-in-an-alias/25854/1 "2020-05-27T01:42:16Z")

</div>

Hi guys,

I was just reading the documentation

It says for redirects this is recommended:

```
<title>https://example.com/posts/my-intended-url</title>
<link rel="canonical" href="https://example.com/posts/my-intended-url"/>
<meta name="robots" content="noindex">
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<meta http-equiv="refresh" content="0; url=https://example.com/posts/my-intended-url"/>

```

Isn’t this wrong? the canonical is the same url as the page it’s being redirected to? Looks like a redirect loop

---

<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 27, 2020, 1:45am UTC](https://discourse.gohugo.io/t/redirect-loop-in-an-alias/25854/2 "2020-05-27T01:45:14Z")

</div>

Which documentation?

---

<div class="post-metadata">

**Author:** ![short](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/short/32/11382_2.png) [@short](https://discourse.gohugo.io/u/short)\
**Post date:** [May 27, 2020, 1:48am UTC](https://discourse.gohugo.io/t/redirect-loop-in-an-alias/25854/3 "2020-05-27T01:48:58Z")

</div>

> **[URL Management](https://gohugo.io/content-management/urls/#aliases)**
>
> Hugo supports permalinks, aliases, link canonicalization, and multiple options for handling relative vs absolute URLs.

---

<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:** [May 27, 2020, 2:50am UTC](https://discourse.gohugo.io/t/redirect-loop-in-an-alias/25854/4 "2020-05-27T02:50:04Z")

</div>

foo.html

```auto
<link rel="canonical" href="https://example.com/posts/my-intended-url"/>

```

This tells the browser that the canonical URL for `foo.html` is `https://example.com/posts/my-intended-url`.

```auto
<meta http-equiv="refresh" content="0; url=https://example.com/posts/my-intended-url"/>

```

This tells the browser to go there.

There is no loop.

---

<div class="post-metadata">

**Author:** ![short](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/short/32/11382_2.png) [@short](https://discourse.gohugo.io/u/short)\
**Post date:** [May 27, 2020, 3:09am UTC](https://discourse.gohugo.io/t/redirect-loop-in-an-alias/25854/5 "2020-05-27T03:09:46Z")

</div>

hmmm i will do some more research about it…
