Check 24.06 · Multilingual indexing and sitemaps

Check noindex by language

Check noindex in tags and X-Robots-Tag headers language by language, remove the leftovers and cleanly apply a noindex to a language still in preparation.

Priority
Critical
Difficulty
Intermediate
Estimated time
1 to 3 h
Free, no account: your progress is saved in this browser.

Ask an AI to check this point on your site

Opens the assistant with a ready-made question: this check, its goal and your site URL.

For Gemini, Copilot or another assistant, copy the question. The link opens the chosen service directly: nothing goes through this site.

In short

A noindex can affect a single language: left in place since the Spanish version was being prepared, inherited from a translation plugin setting, or added by a server header on a directory. The task is to check, language by language and template by template, that pages that should be indexed have no noindex, neither in a <meta name="robots"> tag nor in an X-Robots-Tag header, and that the rare languages excluded on purpose are excluded cleanly: crawlable, out of the sitemap and out of the hreflang annotations.

Why it matters

noindex is a directive, not a hint: when Googlebot reads it, it removes the page from the results, even if other sites link to it. It can be in two places, the <meta name="robots" content="noindex"> tag in the HTML or the X-Robots-Tag: noindex HTTP header, and it must be readable: a page blocked by robots.txt is not crawled, so its noindex is never seen.

On a multilingual site, the risk is specific to each language:

  • a language in preparation set to noindex, then published without removing the directive;
  • per-content SEO settings not carried over from one language to another by the translation plugin, in one direction or the other;
  • a server or CDN rule on a directory (/es/) or a subdomain (es.example.com) forgotten after testing;
  • a language-specific template (child theme, dedicated home page) that carries its own robots tag.

Overall traffic reveals nothing: a secondary language entirely set to noindex can go unnoticed for months. The hreflang annotations pointing to those pages become useless, since their targets are not indexable. Generative engines that rely on search indexes cannot cite those pages either. Some AI crawlers do not read robots directives the same way Googlebot does: do not count on noindex to keep a language away from every crawler.

What it improves

  • Indexing Every published language can enter the index.
  • hreflang consistency The annotations' targets are indexable.
  • International traffic A language blocked by mistake starts receiving impressions once the directive is removed and the page recrawled.
  • Control Deliberate exclusions are documented and consistent with the sitemap.
  • Citations in AI answers An indirect, non-guaranteed effect.

How to check

Tag and header, on a sample per language. Put one URL per language and per template in urls.txt, then:

while read -r url; do
  header=$(curl -sI "$url" | grep -i '^x-robots-tag:' | tr -d '\r')
  meta=$(curl -s "$url" | grep -oiE '<meta[^>]*name="?(robots|googlebot)"?[^>]*>' | tr '\n' ' ')
  printf '%s\n  header: %s\n  tag: %s\n' "$url" "${header:-none}" "${meta:-none}"
done < urls.txt

Expected result for a page to be indexed: no noindex in the header or in the tag. A content="index, follow" tag and the absence of a tag are equivalent.

Robots.txt. Check that no Disallow: /es/ line blocks a language you want indexed, or whose noindex you want read: see check robots.txt access and syntax (opens in a new tab).

Across the whole site. With Screaming Frog, create one segment per language (Configuration > Segments), crawl, then open the Directives tab, “Noindex” filter. The crawler reads both the tag and the X-Robots-Tag header. Export and count the URLs per segment: an entire language, or an entire template within a language, points to a global rule.

In Search Console. In each language's property, the “Excluded by ‘noindex’ tag” reason in the Page indexing report lists the excluded URLs. The URL Inspection tool shows, in the indexing section, whether indexing is allowed. Bing Webmaster Tools gives the same information in URL Inspection.

How to implement

Before you start

Draw up the expected matrix, language by template, and compare it with the crawl results:

Template fr de en es (in preparation)
Home, categories, product pages, articles index index index noindex
Internal search, cart, account noindex noindex noindex noindex
Legal pages index index index noindex

Rules for a language excluded on purpose:

To remove a noindex set by mistake, also follow remove accidental noindex tags (opens in a new tab).

Apache

Versions Apache 2.4.

To exclude a language served in a directory, in the .htaccess at the root (Apache 2.4 and later, mod_headers module):

<IfModule mod_headers.c>
    <If "%{REQUEST_URI} =~ m#^/es/#">
        Header set X-Robots-Tag "noindex, follow"
    </If>
</IfModule>

To lift the exclusion, remove the block. Also look for forgotten rules:

grep -rn -i "x-robots-tag" /etc/apache2/ /var/www/example/.htaccess 2>/dev/null

Reload with sudo apachectl configtest && sudo systemctl reload apache2.

Nginx

Versions Nginx 1.24 and later.

A map in the http context avoids duplicating location blocks:

map $uri $robots_by_language {
    default "";
    ~^/es/ "noindex, follow";
}

In the server block:

add_header X-Robots-Tag $robots_by_language always;

Nginx does not send the header when the value is empty: the other languages are unaffected. An add_header in a location block cancels those inherited from the server block: check the result with curl -sI. To find a forgotten rule:

sudo nginx -T 2>/dev/null | grep -n -i "x-robots-tag"
sudo nginx -t && sudo systemctl reload nginx

Cloudflare

Versions Cloudflare dashboard, all plans, November 2026.

A transform rule can add X-Robots-Tag to a language without touching the server: from the rules overview, Create rule > Response Header Transform Rule.

  • Expression: (starts_with(http.request.uri.path, "/es/"))
  • Action: “Set static”, header X-Robots-Tag, value noindex, follow, then “Deploy”.

Check this same list of rules during the audit: a rule added during testing and never removed is a common cause. For a language subdomain, use http.host eq "es.example.com".

WordPress

Versions WordPress 6.4 to 7.1; WPML 4, Polylang 3, Yoast SEO 20 and later, Rank Math 1.0.

  • Global setting: in Settings > Reading, the “Discourage search engines from indexing this site” box must be unticked. It affects every language of the same installation.
  • Per-content settings: the noindex chosen in the “Advanced” tab of Yoast SEO or Rank Math is specific to each post. Depending on the translation plugin and its custom field settings, it may or may not be copied to the translations. Check each language with a crawl rather than assuming.
  • Per-content-type settings of the SEO plugin: they apply to every language.

To exclude an entire language in code, filter WordPress's robots tag. With WPML:

add_filter('wp_robots', function (array $robots): array {
    $currentLanguage = apply_filters('wpml_current_language', null);

    if ($currentLanguage !== 'es') {
        return $robots;
    }

    $robots['noindex'] = true;
    $robots['follow'] = true;

    return $robots;
});

With Polylang, replace the first line with $currentLanguage = function_exists('pll_current_language') ? pll_current_language() : null;. If Yoast SEO handles the robots tag, go through its wpseo_robots filter, which receives a string; with Rank Math, through rank_math/frontend/robots. Purge the page cache afterwards.

Shopify

Versions Shopify admin and Online Store 2.0 themes, all plans, November 2026.

An unpublished language is not accessible to visitors: this is the simplest way to keep a translation out of the index. Languages are published in Settings > Languages, then per market.

To keep a version published but out of the index, Shopify explains that the seo.hidden metafield hides a resource in all markets at once, and recommends a conditional noindex tag in the theme to exclude only one market. The same principle applies to a language. In layout/theme.liquid, inside <head>:

{%- if request.locale.iso_code == 'es' -%}
  <meta name="robots" content="noindex, follow">
{%- endif -%}

During the audit, search for noindex in layout/theme.liquid and the snippets: a forgotten condition of this kind quickly becomes invisible.

Laravel

Versions Laravel 10 to 13.

A middleware reads the list of excluded languages from the configuration:

// app/Http/Middleware/NoindexLocales.php
namespace App\Http\Middleware;

use Closure;
use Illuminate\Http\Request;
use Symfony\Component\HttpFoundation\Response;

class NoindexLocales
{
    public function handle(Request $request, Closure $next): Response
    {
        $response = $next($request);

        if (! in_array(app()->getLocale(), config('app.noindex_locales', []), true)) {
            return $response;
        }

        $response->headers->set('X-Robots-Tag', 'noindex, follow');

        return $response;
    }
}

In config/app.php, add 'noindex_locales' => ['es'],. To lift the exclusion, empty the array and run php artisan config:cache. The middleware still has to be registered in the web group, after the one that sets the language, and this is where the versions differ.

Laravel 11 to 13

Since Laravel 11, app/Http/Kernel.php no longer exists in new applications: middleware is registered in bootstrap/app.php.

use App\Http\Middleware\NoindexLocales;
use Illuminate\Foundation\Configuration\Middleware;

->withMiddleware(function (Middleware $middleware): void {
    $middleware->web(append: [
        NoindexLocales::class,
    ]);
})

An application upgraded from Laravel 10 that kept its Kernel.php follows the next tab.

Laravel 10 and earlier

Add the middleware at the end of the web group, in app/Http/Kernel.php:

protected $middlewareGroups = [
    'web' => [
        // … existing middleware, including the one that sets the language
        \App\Http\Middleware\NoindexLocales::class,
    ],
];

Next.js

Versions Next.js 15 and 16; the header works with both the App Router and the Pages Router, the tag through generateMetadata with the App Router.

With a header, in next.config.js:

module.exports = {
  async headers() {
    return [
      {
        source: '/es/:path*',
        headers: [{ key: 'X-Robots-Tag', value: 'noindex, follow' }],
      },
    ];
  },
};

Or with a tag, in app/[lang]/layout.tsx:

export async function generateMetadata({ params }: { params: Promise<{ lang: string }> }) {
  const { lang } = await params;

  return lang === 'es' ? { robots: { index: false, follow: true } } : {};
}

During the audit, search for robots and X-Robots-Tag in the code: a value set in a layout applies to every page in the language.

Nuxt

Versions Nuxt 3 and 4.

With route rules, in nuxt.config.ts:

export default defineNuxtConfig({
  routeRules: {
    '/es/**': { headers: { 'X-Robots-Tag': 'noindex, follow' } },
  },
});

After lifting an exclusion

  1. Remove the directive, purge the caches and check with the command from the “How to check” section.
  2. Add the language to the sitemap and the hreflang annotations.
  3. Request indexing of the main pages in the URL Inspection tool; the rest will follow at the crawl's pace.
  4. Track the “Excluded by ‘noindex’ tag” reason in the language's property: it should go down over the following weeks.

Common mistakes

  • Blocking the language in robots.txt on top of the noindex: the crawler no longer reads the directive, and URLs can stay indexed without their content.
  • Checking only the tag and forgetting the X-Robots-Tag header, set by the server or the CDN.
  • Leaving a noindex language in the sitemap and in hreflang: contradictory signals.
  • Assuming that a page's setting applies to its translations, or the other way round.
  • Forgetting caches: the page keeps being served with the old directive.
  • Excluding a language with noindex when it is not ready: it stays visible to visitors and to crawlers that ignore the directive. Authentication is safer.

Frequently asked questions

How do I know whether a language on my site is set to noindex?

Request a few URLs in that language with curl and read the X-Robots-Tag header and the meta robots tag in the HTML. Across the whole site, crawl with Screaming Frog, segment by language directory and open the Directives tab, Noindex filter. In Search Console, the language's property shows the “Excluded by ‘noindex’ tag” reason in the Page indexing report.

Can you set a language to noindex while it is being translated?

It is possible, but authentication is often preferable while the language is not ready: it hides the pages from visitors and crawlers alike. If you choose noindex, leave the pages crawlable in robots.txt, remove them from the sitemap and the hreflang annotations, and note the lifting date. Then check, on publication, that the directive has actually gone.

Should you block a language in robots.txt or use noindex?

To keep a language out of the index, use noindex, not robots.txt. A robots.txt block prevents crawling, and therefore reading the noindex, and Google can then index the URLs without their content if links point to them. Keep robots.txt for limiting crawling of areas of no interest, and noindex or authentication for keeping pages out of the results.

Does a page's noindex apply to its translations?

Not necessarily. Each translation is a separate URL, with its own tag and its own headers. Depending on the translation plugin and its settings, the noindex chosen on the original page may or may not be copied to the translations. Assume nothing: check each language with a segmented crawl or a few curl requests.

Updated on

Topic checklist (PDF)

And now?

In the “Multilingual indexing and sitemaps” topic

  1. Use a self-referencing canonical for each actual translation
  2. Do not canonicalize all translations to the main language
  3. Check that each language is indexed independently
  4. Identify duplicates within a language
  5. Handle near-identical regional variants
  6. Check noindex by language
  7. Check untranslated URLs and fallbacks
  8. Check localized 404 errors
  9. Check redirects and old translated URLs
  10. Compare Google-selected canonicals
  11. Create per-language sitemaps if useful
  12. Create a sitemap index
  13. Automate sitemaps
  14. Exclude unpublished or non-indexable translations
  15. Manage lastmod per translation
  16. Submit sitemaps to Google/Bing
  17. Track the indexing rate by language