Redirect loop in an alias?

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

Which documentation?

1 Like

foo.html

<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.

<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.

1 Like

hmmm i will do some more research about it…