No description
  • PHP 88.7%
  • CSS 5.7%
  • JavaScript 5.6%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-11-04 13:41:38 +00:00
assets v3.6.0 2026-11-04 13:41:38 +00:00
languages v3.6.0 2026-11-04 13:41:38 +00:00
changelog.txt v3.6.0 2026-11-04 13:41:38 +00:00
LICENSE v3.0.3 2026-07-18 17:39:42 +00:00
noindex-seo.php v3.6.0 2026-11-04 13:41:38 +00:00
readme.txt v3.6.0 2026-11-04 13:41:38 +00:00
uninstall.php v3.6.0 2026-11-04 13:41:38 +00:00

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

=== noindex SEO ===
Contributors: robotstxt, javiercasares
Tags: seo, noindex, nofollow, noarchive, robots
Requires at least: 7.0
Tested up to: 7.2
Stable tag: 3.6.0
Requires PHP: 8.3
Version: 3.6.0
License: GPL-3.0-or-later
License URI: https://www.gnu.org/licenses/gpl-3.0.txt

Control search engine indexing with robots directives using HTML meta tags or HTTP headers.

== Description ==

Fine-grained control over how search engines index and display your WordPress content. Apply 10 robots directives to 25 different page contexts with flexible implementation methods.

**5 Boolean Robots Directives:**

* **noindex**: Prevent search engines from indexing the page
* **nofollow**: Prevent search engines from following links on the page
* **noarchive**: Prevent search engines from showing cached versions
* **nosnippet**: Prevent search engines from showing text snippets in results
* **noimageindex**: Prevent search engines from indexing images on the page

**5 Value Robots Directives (3.6.0):**

* **notranslate**: Ask search engines not to translate the page
* **max-snippet**: Limit the text snippet length in characters (-1 = no limit)
* **max-image-preview**: Limit the image preview size (none / standard / large)
* **max-video-preview**: Limit the video preview length in seconds (-1 = no limit)
* **unavailable_after**: Stop indexing the page after a date and time

**Conditional rules (3.6.0):** automatically apply noindex to any post whose custom field (for example an ACF field) exactly matches a value you define.

**Implementation Methods:**

* HTML Meta Tags: Traditional method, easy to verify in page source (default)
* HTTP Headers: More robust, works with all content types including PDFs and images
* Both: Maximum compatibility for all scenarios

**Control Levels:**

* Global Settings: Apply directives to 25 different page contexts (posts, pages, archives, etc.)
* Granular Control (Optional): Override global settings for individual posts, pages, and custom post types via meta boxes in the editor

**Perfect for:**

* Blocking indexing of attachment pages while allowing link following
* Preventing duplicate content issues with flexible directive combinations
* Controlling archive page indexing with granular control
* Managing pagination SEO with independent settings
* Protecting private content from search engine caching
* Preventing snippet display while still indexing content

**Main pages**

* Front Page: Block the indexing of the site's front page.
* Home: Block the indexing of the site's home page.

**Pages and Posts**

* Page: Block the indexing of the site's pages.
* Privacy Policy: Block the indexing of the site's privacy policy page.
* Single: Block the indexing of a post on the site.
* Singular: Block the indexing of a post or a page of the site.

**Taxonomies**

* Category: Block the indexing of the site categories. The lists where the posts appear.
* Tag: Block the indexing of the site's tags. The lists where the posts appear.

**Dates**

* Date: Block the indexing when any date-based archive page (i.e. a monthly, yearly, daily or time-based archive) of the site. The lists where the posts appear.
* Day: Block the indexing when a daily archive of the site. The lists where the posts appear.
* Month: Block the indexing when a monthly archive of the site. The lists where the posts appear.
* Time: Block the indexing when an hourly, "minutely", or "secondly" archive of the site. The lists where the posts appear.
* Year: Block the indexing when a yearly archive of the site. The lists where the posts appear.

**WooCommerce**

* Cart: Block the indexing of the WooCommerce cart page.
* Checkout: Block the indexing of the WooCommerce checkout page.
* My Account: Block the indexing of the WooCommerce customer account pages (including order history and address endpoints).

**Archives**

* Archive: Block the indexing of any type of Archive page. Category, Tag, Author and Date based pages are all types of Archives. The lists where the posts appear.
* Author: Block the indexing of the author's page, where the author's publications appear.
* Post Type Archive: Block the indexing of any post type page.

**Pagination**

* Pagination: Block the indexing of the pagination, i.e. all pages other than the main page of an archive.

**Search**

* Search: Block the indexing of the internal search result pages.

**Attachments**

* Attachment: Block the indexing of an attachment document to a post or page. An attachment is an image or other file uploaded through the post editor's upload utility. Attachments can be displayed on their own "page" or template. This will not cause the indexing of the image or file to be blocked.

**Previews**

* Customize Preview: Block the indexing when a content is being displayed in customize mode.
* Preview: Block the indexing when a single post is being displayed in draft mode.

**Error Page**

* Error 404: This will cause an error page to be blocked from being indexed. As it is an error page, it should not be indexed per se, but just in case.

Important note: if you have any doubt about any of the following items it is best not to activate the option as you could lose results in the search engines.

== Using the plugin ==

= WP-CLI =

The plugin ships a `wp noindex-seo` command namespace (WP-CLI 2.x required):

* `wp noindex-seo list [--only=<context>] [--format=<format>]` — lists every context × directive pair and its on/off status (table, csv, json or yaml).
* `wp noindex-seo set <context> [<directive>...]` — enables directives on a context (default: all six boolean directives). Boolean directives go by name; value directives as `name=value`: `wp noindex-seo set search noindex noarchive`, `wp noindex-seo set archive max-snippet=-1 max-image-preview=large`.
* `wp noindex-seo unset <context> [<directive>...]` — disables directives on a context.
* `wp noindex-seo export [<file>]` — prints the settings payload as JSON to STDOUT, or writes it to a file.
* `wp noindex-seo import <file> [--dry-run]` — restores settings from an export; `--dry-run` reports how many values would change without saving.
* `wp noindex-seo override <post_id>... [--off]` — bulk per-post granular overrides; scales past the ~200-post ceiling of the bulk UI. `--off` also clears the directive meta.

The commands enforce the same rules as the settings page (unknown contexts and directives are rejected; the attachment context refuses to enable while the implementation method is meta-only).

= Export / Import =

The settings page includes an "Export settings" button that downloads the current global settings as a JSON file, and an "Import settings" form that restores them on the same or another site (useful for migrations and staging-to-production copies). Imports are strictly validated, and per-post / per-term overrides are never touched.

= REST API =

The plugin exposes two read-only endpoints under `/wp-json/noindex-seo/v1/` so headless consumers can read the configuration:

* `GET /settings`: returns the consolidated settings array (contexts and directives plus config). Requires an authenticated user with the `manage_options` capability.
* `GET /effective?post_id=123`: returns the list of active directives for a specific post, computed with the same precedence used on the front-end (per-post override, then conditional rules, then per-post-type default, then the built-in context). Value directives return as `name:value` tokens (e.g. `max-snippet:-1`); `source` is `post_meta`, `auto_rule` (a conditional rule matched) or `global_setting`. Public only for published, non-password-protected posts; everything else requires `edit_post` capabilities.

On WordPress versions with XML sitemaps (5.5+), URLs that are noindexed are automatically excluded from the core sitemaps.

== Multisite ==

The plugin is designed **per site** and works on WordPress Multisite when activated on each site individually (or via the Network Admin's "Add Plugin" per-site flow):

* Directives are site-content concerns, so every site keeps its own independent settings, per-post overrides, per-term overrides and conditional rules (stored per site, no network-wide storage).
* There is no network-admin settings page and no `Network: true` header by design: activating the plugin network-wide would apply each site's own settings anyway (each site reads its own options), so per-site activation is the intended and documented mode.
* To roll out the same configuration across sites, use the built-in export/import (Tools tab, JSON) or `wp noindex-seo export` / `wp noindex-seo import` per site — for example with WP-CLI's `--url` switch.

== Installation ==

= Automatic download =

Visit the plugin section in your WordPress, search for [noindex-seo]; download and install the plugin.

= Manual download =

Extract the contents of the ZIP and upload the contents to the `/wp-content/plugins/noindex-seo/` directory. Once uploaded, it will appear in your plugin list.

== Frequently Asked Questions ==

= Does the noindex directive remove the URL from the XML sitemap? =

Yes. On WordPress 5.5 or newer, any URL that receives a noindex directive from the plugin is excluded from the core XML sitemaps (`/wp-sitemap.xml`), both through the global context settings and through the granular per-post / per-term overrides.

= What is the difference between the HTML meta tags and the HTTP headers implementation methods? =

Both send the same robots directives to search engines. The meta tag method outputs a `<meta name="robots">` tag in the HTML head and is easy to verify in the page source. The HTTP header method sends an `X-Robots-Tag` header, which also works for non-HTML content such as PDFs, images and feeds. The "Both" method sends the two signals at the same time.

= Will I lose my settings when I uninstall the plugin? =

No. By default all plugin data is preserved on uninstall. If you want a complete cleanup, enable the "Delete all plugin data on uninstall" option in the settings page before removing the plugin.

== Compatibility ==

* WordPress: 7.0 - 7.2
* PHP: 8.3 - 8.6

== Changelog ==

= 3.6.0 =

Feature release: 5 modern robots directives (notranslate, max-snippet, max-image-preview, max-video-preview, unavailable_after) available on every surface — global contexts, per-post and per-term overrides, Quick Edit, the block editor sidebar, REST and WP-CLI (name=value tokens); conditional auto-noindex rules that apply noindex when a custom field (e.g. an ACF field) exactly matches a value (matched posts also drop out of the XML sitemap); Multisite behavior documented (per-site by design, with export/import-based rollout).

= 3.5.0 =

WooCommerce special-page contexts: dedicated robots directives for the Cart, Checkout and My Account pages (detected through the page-ID options, no WooCommerce code needed), recommended by default and mirrored across the front-end, the REST /effective endpoint and the core XML sitemaps. Compatibility window updated to WordPress 7.0 - 7.2 and PHP 8.3 - 8.6 (tested on WordPress 7.2-beta3 and PHP 8.6.0RC3). The five directive icons now render as SVG through the WordPress Icons API on WP 7.2+ (legacy emoji fallback on WP 7.0 - 7.1), matching the SVG direction of the WordPress 7.2 admin. Fixed the `wp noindex-seo list` command, which fatalled on real WP-CLI installs (its `--context` filter collided with WP-CLI 2.11+'s reserved global flag, now `--only`, and the output call used a nonexistent API).

= 3.4.0 =

WP-CLI support: a `wp noindex-seo` command namespace with `list`, `set`, `unset`, `export`, `import` and bulk per-post `override` — automation-friendly and scaling past the ~200-post ceiling of the bulk UI.

= Previous versions =

If you want to see the full changelog, visit the [noindex SEO plugin page](https://www.robotstxt.software/plugins/noindex-seo/).

== Compliance ==

This plugin adheres to the following security measures and review protocols for each version:

* [WordPress Plugin Handbook](https://developer.wordpress.org/plugins/)
* [WordPress Plugin Security](https://developer.wordpress.org/plugins/wordpress-org/plugin-security/)
* [WordPress APIs Security](https://developer.wordpress.org/apis/security/)
* [WordPress Coding Standards](https://github.com/WordPress/WordPress-Coding-Standards)
* [Plugin Check (PCP)](https://wordpress.org/plugins/plugin-check/)

== Privacy ==

* This plugin does not collect any information about your site, your identity, the plugins, themes or content the site has.

== Vulnerabilities ==

* No vulnerabilities have been published up to version 3.6.0.

Found a security vulnerability? Please report it to us privately at the [noindex SEO GitHub repository](https://github.com/javiercasares/noindex-seo/security/advisories/new).