# Redirecting to multilang URL after language refactoring

**URL:** <https://discourse.gohugo.io/t/redirecting-to-multilang-url-after-language-refactoring/38368>\
**Category:** support\
**Tags:** i18n\
**Created:** [April 27, 2022, 9:19am UTC](https://discourse.gohugo.io/t/redirecting-to-multilang-url-after-language-refactoring/38368 "2022-04-27T09:19:23Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![popovich](https://avatars.discourse-cdn.com/v4/letter/p/97f17d/32.png) [@popovich](https://discourse.gohugo.io/u/popovich)\
**Post date:** [April 27, 2022, 9:19am UTC](https://discourse.gohugo.io/t/redirecting-to-multilang-url-after-language-refactoring/38368/1 "2022-04-27T09:19:23Z")

</div>

Hi,  
I am refactoring the multilingual structure for the website and moving every page that was under `/` to `/de` and everything that was under `/en` to `/`. To avoid complete breakdown (a lot of those links are ranked pretty high), I was trying to find the solution with redirects. Surely, I’ve read the [URL Management | Hugo](https://gohugo.io/content-management/urls/) but I still can’t find how to set the alias/redirect for those pages correctly. Here is an example of the \_index.de.md which I have used before:

```auto
---
title: "Page title"
date: 2017-11-21T21:28:43+01:00
description: "Some meta description."
keywords: "some keywords"
draft: false
layout: single
type: industry-a
url: branche-a
aliases:
- industry-a
---

```

So the old URL was `domain.tld/branche-a` which now needs to redirect to `domain.tld/de/branche-a`  
Moreover, the old `domain.tld/en/some-url` needs to redirect to `domain.tld/some-url`

Setting another alias in the frontmatter example above like this:

```auto
url: branche-a
aliases:
- industry-a
- de/branche-a

```

didn’t help. Any ideas?

---

<div class="post-metadata">

**Author:** ![popovich](https://avatars.discourse-cdn.com/v4/letter/p/97f17d/32.png) [@popovich](https://discourse.gohugo.io/u/popovich)\
**Post date:** [April 27, 2022, 12:21pm UTC](https://discourse.gohugo.io/t/redirecting-to-multilang-url-after-language-refactoring/38368/2 "2022-04-27T12:21:29Z")

</div>

Sometimes writing down a question and then trying harder gets your the result:

```auto
url: branche-a
aliases:
- industry-a
- ../branche-a

```

The path relative to root did the trick.
