# "noindex" in the multilingual redirect—does this work for everyone?

**URL:** <https://discourse.gohugo.io/t/noindex-in-the-multilingual-redirect-does-this-work-for-everyone/47837>\
**Category:** support\
**Created:** [January 15, 2024, 8:41pm UTC](https://discourse.gohugo.io/t/noindex-in-the-multilingual-redirect-does-this-work-for-everyone/47837 "2024-01-15T20:41:07Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![dogweather](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/dogweather/32/18817_2.png) [@dogweather](https://discourse.gohugo.io/u/dogweather)\
**Post date:** [January 15, 2024, 8:41pm UTC](https://discourse.gohugo.io/t/noindex-in-the-multilingual-redirect-does-this-work-for-everyone/47837/1 "2024-01-15T20:41:07Z")

</div>

It’s been mentioned before but I haven’t found a resolution.

Google wasn’t indexing my site due to this. I manually asked Google to index the `/en` URL, and hopefully that ought to be enough to fix Google indexing.

So I’m wondering about whether this is wise to have in the root redirect. It silently breaks indexing in some situations. I’m probably going to have to add Cloudflare to my site so I can create a 301 redirect and avoid this issue altogether.

---

<div class="post-metadata">

**Author:** ![panchtatvam](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/panchtatvam/32/20935_2.png) [@panchtatvam](https://discourse.gohugo.io/u/panchtatvam)\
**Post date:** [January 16, 2024, 9:32am UTC](https://discourse.gohugo.io/t/noindex-in-the-multilingual-redirect-does-this-work-for-everyone/47837/2 "2024-01-16T09:32:07Z")

</div>

Is your issue similar to [this](https://discourse.gohugo.io/t/multilingual-site-remove-redirect/19492) ?

---

<div class="post-metadata">

**Author:** ![dogweather](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/dogweather/32/18817_2.png) [@dogweather](https://discourse.gohugo.io/u/dogweather)\
**Post date:** [January 17, 2024, 5:13am UTC](https://discourse.gohugo.io/t/noindex-in-the-multilingual-redirect-does-this-work-for-everyone/47837/3 "2024-01-17T05:13:58Z")

</div>

Thanks, no, it’s redirecting and serving correctly. I’m talking about the `<meta name=robots content="noindex">` tag in a redirect response:

```bash
curl https://forkful.ai/

```

```html
<!doctype html>
<html lang=de-DE>
  <head>
    <title>https://forkful.ai/en/</title>
    <link rel=canonical href=https://forkful.ai/en/>
    <meta name=robots content="noindex">
    <meta charset=utf-8>
    <meta http-equiv=refresh content="0; url=https://forkful.ai/en/">
  </head>
</html>

```

But you know, looking at this, I see a couple other problems: The `lang=de-DE` (`en` is the default language). And the `<title>` getting set. Also the canonical—that’s wrong.

Huh! I’d say there are a lot of issues with this. If I have time, I’ll try to reproduce it with a fresh project and submit a ticket.

* * *

I just switched my DNS to Cloudflare so I can do an HTTP 301 to `/en`. So this response won’t be like this for long.

---

<div class="post-metadata">

**Author:** ![frjo](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/frjo/32/18626_2.png) [@frjo](https://discourse.gohugo.io/u/frjo)\
**Post date:** [January 17, 2024, 7:02am UTC](https://discourse.gohugo.io/t/noindex-in-the-multilingual-redirect-does-this-work-for-everyone/47837/4 "2024-01-17T07:02:55Z")

</div>

According to [https://developers.google.com/search/docs/crawling-indexing/301-redirects#metarefresh](https://developers.google.com/search/docs/crawling-indexing/301-redirects#metarefresh) Hugos redirects are not optimal but should work well enough.

I use them on a number of multilang sites without issues.

The “lang” attribute is wrong as you point out. Do you have “weight” set on your languages in the conf file? If you set “weight=1” on English it will correct itself I think.

The “canonical” look correct to me, it instruct that this page has a more proper version at another address. See [https://developers.google.com/search/docs/crawling-indexing/canonicalization](https://developers.google.com/search/docs/crawling-indexing/canonicalization)

---

<div class="post-metadata">

**Author:** ![dogweather](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/dogweather/32/18817_2.png) [@dogweather](https://discourse.gohugo.io/u/dogweather)\
**Post date:** [January 17, 2024, 7:13am UTC](https://discourse.gohugo.io/t/noindex-in-the-multilingual-redirect-does-this-work-for-everyone/47837/5 "2024-01-17T07:13:46Z")

</div>

No, I actually have `de` at weight 1 and `en` at weight 2. And I also have:

```auto
defaultContentLanguage: en

```

---

<div class="post-metadata">

**Author:** ![panchtatvam](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/panchtatvam/32/20935_2.png) [@panchtatvam](https://discourse.gohugo.io/u/panchtatvam)\
**Post date:** [January 17, 2024, 8:09am UTC](https://discourse.gohugo.io/t/noindex-in-the-multilingual-redirect-does-this-work-for-everyone/47837/6 "2024-01-17T08:09:04Z")

</div>

Why would you give higher precedence to the non-default language `de` ?

---

<div class="post-metadata">

**Author:** ![frjo](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/frjo/32/18626_2.png) [@frjo](https://discourse.gohugo.io/u/frjo)\
**Post date:** [January 17, 2024, 9:14am UTC](https://discourse.gohugo.io/t/noindex-in-the-multilingual-redirect-does-this-work-for-everyone/47837/7 "2024-01-17T09:14:44Z")

</div>

> [@dogweather](#):
>
> No, I actually have `de` at weight 1 and `en` at weight 2. And I also have:

Switch so you have weight 1 on “en” instead and it should work.

---

<div class="post-metadata">

**Author:** ![dogweather](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/dogweather/32/18817_2.png) [@dogweather](https://discourse.gohugo.io/u/dogweather)\
**Post date:** [January 17, 2024, 6:21pm UTC](https://discourse.gohugo.io/t/noindex-in-the-multilingual-redirect-does-this-work-for-everyone/47837/8 "2024-01-17T18:21:21Z")

</div>

For display purposes: Languages are typically listed in order of their two-letter codes. My site’s home page:

 ![Screenshot 2024-01-17 at 11.25.59 AM](https://canada1.discourse-cdn.com/flex036/uploads/gohugo/original/3X/1/3/1319c4b45aa938a9fa276228680cda2adb99e836.jpeg)

---

<div class="post-metadata">

**Author:** ![dogweather](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/dogweather/32/18817_2.png) [@dogweather](https://discourse.gohugo.io/u/dogweather)\
**Post date:** [January 17, 2024, 6:21pm UTC](https://discourse.gohugo.io/t/noindex-in-the-multilingual-redirect-does-this-work-for-everyone/47837/9 "2024-01-17T18:21:39Z")

</div>

Ouch. B-b-but `defaultContentLanguage: en`!

---

<div class="post-metadata">

**Author:** ![dogweather](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/dogweather/32/18817_2.png) [@dogweather](https://discourse.gohugo.io/u/dogweather)\
**Post date:** [January 17, 2024, 6:27pm UTC](https://discourse.gohugo.io/t/noindex-in-the-multilingual-redirect-does-this-work-for-everyone/47837/10 "2024-01-17T18:27:57Z")

</div>

FYI, everyone: Cloudflare has a free account level which includes creating redirects. So my site now returns `301` for `/` → `/en/ `without even hitting GitHub Pages.
