Unwanted noindex tag being inserted into every page

When I build my hugo website a “noindex” tag appears in the public files for every page. (Noindex tells search engines to exclude the page)

This is the repo https://github.com/sansculo/otruth

e.g. oT8ICNe

I tried adding robots = “index,follow” to the config file but it didnt change anything i.e. public files still show noindex

1 Like

Your theme is doing it, in layouts/_default/baseof.html:

    {{/* NOTE: For Production make sure you add `HUGO_ENV="production"` before your build command */}}
    {{ if eq (getenv "HUGO_ENV") "production" | or (eq .Site.Params.env "production")  }}
      <META NAME="ROBOTS" CONTENT="INDEX, FOLLOW">
    {{ else }}
      <META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
    {{ end }}
5 Likes

thank you very much :slightly_smiling_face:

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.