This project is not covered by Drupal’s security advisory policy.

Query Noindex tells search engines not to index a page when its URL contains query parameters you choose, while the same page without those parameters stays indexable.

A query parameter is the extra text after ? in a URL. Drupal often adds those when a visitor filters a list, searches the site, or uses Facets. Each combination is a separate URL that can show up in Google Search Console as a copy of the same page. This module marks those filtered URLs with <meta name="robots" content="noindex, follow">. The page still loads normally (HTTP 200), and links on it can still be followed. The clean URL, such as /news or /products, stays eligible for indexing.

Features

After you enable the module and list the parameter names you care about, a public HTML page that includes one of those names receives a noindex, follow robots meta tag.

  • One settings form. No extra modules are required.
  • Nothing changes on the site until you save at least one parameter name.
  • Administrative pages, such as /admin/content, are skipped by default.
  • Common campaign parameters (utm_source, utm_medium, utm_campaign, utm_term, utm_content, gclid, fbclid) are ignored, so a tracking link alone does not noindex the page.
  • A watched parameter together with an ignored one still noindexes the page. Example: /node/1?topic=news&utm_source=newsletter when topic is on the watch list.
  • An empty value still counts. ?search= noindexes the page when search is watched.
  • Page cache varies by the query string while the module is enabled, so a noindex response is not reused for the clean URL.

Use it when Views exposed filters, site search, or Facets create many URLs that share one path. Examples: /news?topic=12, /?search=lorem, and /products?f[0]=color:12.

Post-Installation

Enable Query Noindex. With the default settings, public pages are unchanged because the watch list is empty.

Open Configuration → Search and metadata → Query Noindex (/admin/config/search/query-noindex). You need the Administer Query Noindex permission.

  • Enabled. On by default. Uncheck it to stop adding the tag without uninstalling the module.
  • Parameters to noindex. One name per line, such as search, topic, or f. Names are case-sensitive: Topic does not match topic.
  • Skip administrative routes. On by default. Front-end Views pages are not admin routes, so they are still covered.
  • Parameters to ignore. Campaign names that should not, by themselves, noindex a page.

Enter tags, not tags[]. Drupal reads the query key without the brackets. A name may contain only letters, numbers, underscores, and hyphens.

Leave page off the list unless you want every pager URL noindexed, including page 1 of a listing.

There is no new content type and no text-format change. The module only adds a meta tag in the HTML head of matching pages.

Additional Requirements

Drupal 10.3 or Drupal 11. The module uses Drupal core only.

None. Query Noindex is built to run on its own.

Similar projects

  • Metatag sets robots tags per entity or view. Issue 3566185 asks for noindex when query parameters are present and is still an open feature request. If Metatag also prints a robots tag, the page can contain two. Crawlers treat conflicting robots directives conservatively.
  • NoIndex Metatag noindexes by route, domain, or path wildcard. Issue 3566182 asks for query-parameter support and is still a feature request.
  • Noindex on empty views noindexes a view when an exposed filter returns zero rows. It does not run when the view still has results, and it does not cover Facets. It is Drupal 10 only, and development has stopped.
  • Node Noindex stores a checkbox on each node. It does not apply to query-string URLs or to pages that are not nodes.

Version 1 also leaves these for later or out of scope: canonical link tags, XML sitemap changes, an X-Robots-Tag header, per-view configuration, and Facet pretty paths that contain no query string.

Community Documentation

Configuration and behavior are documented in the project README.md. There is no external walkthrough or demo site yet.

Project information

Releases