promptunit

Faceted Navigation and Filter URL Crawl Fix

Color, size, price and sort filters can turn 100 products into thousands of crawlable URLs, and plugins add hidden add-to-cart and wishlist links on top. This prompt maps your filter URLs, decides which deserve to be indexed and gives you clean rules to stop the rest from wasting Google's time.

Works in ChatGPTClaudeGemini550 words7 inputs to fillSEO-036

Example input

This is exactly what we gave the model. You replace it with your own details.

- Store URL: https://shop.example.com (running shoes and clothing)
- Platform and filter plugin or app: WooCommerce with a filter plugin (adds ?filter_ parameters) and a wishlist plugin
- Number of products and categories: 2,400 products in 60 categories
- Filters available: Brand, size, color, gender, price, rating, sort, in stock
- Example filter URLs (10-20):
/running-shoes/?filter_brand=nike
/running-shoes/?filter_brand=nike&filter_color=red
/running-shoes/?filter_color=red&filter_brand=nike
/running-shoes/?filter_size=42&filter_color=black&orderby=price
/running-shoes/?orderby=popularity
/running-shoes/?min_price=50&max_price=100
/running-shoes/page/3/?filter_brand=asics
/running-shoes/?filter_brand=asics&filter_gender=women
/trail-shoes/?add-to-cart=1882
/trail-shoes/?add_to_wishlist=1882
/running-shoes/?filter_color=purple&filter_size=47 (shows 'No products found')
/womens-running-shoes/?filter_brand=hoka
- Filter combos that people actually search for (if known): 'nike running shoes', 'red running shoes', 'women's hoka running shoes', 'asics trail shoes'
- Crawl Stats or log data showing parameter URLs (optional): Crawl Stats, last 90 days: 41% of Googlebot requests went to URLs with ?filter_ or ?orderby=, and 6% to ?add-to-cart= or ?add_to_wishlist=. New products take 2-3 weeks to show up in Google.

Real output

Pasted straight from the model. We did not fix a word.

Quick diagnosis: 47% of Googlebot's requests (41% filter/sort + 6% cart/wishlist) go to URLs that should never rank. Your real catalog is only about 2,500 useful URLs (2,400 products + 60 categories), so Google spends almost half its visits on duplicates and junk. That is the most likely reason new products take 2–3 weeks to show up. Your split also matches the 2025 pattern: faceted navigation and action parameters are the two biggest sources of crawl waste.

The plan in one line: block action URLs now → clean up filter URLs with noindex, canonicals and 301s for 4–6 weeks → then block them in robots.txt. Your 4 high-demand combos move to clean landing pages.

5 quick questions (I used my guess for each, so correct me if one is wrong)

  1. Which SEO plugin do you use? Guess: Yoast SEO. The code below uses Yoast hooks, and the comments name the Rank Math equivalents.
  2. Which filter plugin is it, and can it filter with AJAX or # URLs? Guess: it uses WooCommerce's native filter_{attribute} format (filter_brand, query_type_brand), outputs plain <a href> links and has an AJAX option.
  3. How many parameter URLs are indexed now, and do any of them get clicks? Guess: a few hundred are indexed, and /running-shoes/?filter_brand=nike and /womens-running-shoes/?filter_brand=hoka get some impressions.
  4. Does /womens-running-shoes/ hold the same products as /running-shoes/?filter_gender=women, and is there a /mens-running-shoes/? Guess: yes to both.
  5. How many values does each filter have? Guess: ~15 brands, ~20 sizes, ~12 colors, 3 genders, and the in-stock filter is filter_stock_status=instock. All count estimates below are based on this guess.

1. URL groups and decisions

URL groupExampleCount estimateDecisionMethod
A1. Action: add to cart/trail-shoes/?add-to-cart=1882~5,000 base (2,400 products × ~2 listing pages); effectively unlimited once multiplied by every filter/sort URLBlock crawling nowrobots.txt; update WooCommerce; turn on AJAX add-to-cart; fix outdated theme template
A2. Action: wishlist (plus compare/remove, if present)/trail-shoes/?add_to_wishlist=1882Same as A1Block crawling nowrobots.txt; update the wishlist plugin and use AJAX mode; report it to the developer if the links stay crawlable
B1. Sort options/running-shoes/?orderby=popularity~300 (60 categories × 5 non-default sorts), multiplied by pages and filtersPhase 1: crawl, canonical to clean category → Phase 2: blockCanonical, then robots.txt
B2. Price, rating, in stock/running-shoes/?min_price=50&max_price=100Unlimited (any number pair) + ~360 rating/stock URLsPhase 1: crawl, noindex → Phase 2: blocknoindex, then robots.txt
C1. Single filter with search demand/running-shoes/?filter_brand=nike3 confirmed (+ 4 guessed)Index, as a clean landing page (not the parameter URL)New landing category; 301 the old URL; keep the old URL crawlable with Allow
C2. Single filter that copies an existing category/running-shoes/?filter_gender=women~120 (60 categories × 2 genders)Don't index. Send users and Google to the real category301 to /womens-running-shoes/; link the gender filter straight to the category
C3. Single filter with no demand/running-shoes/?filter_size=42~3,000 (50 values × 60 categories)Phase 1: noindex → Phase 2: blocknoindex; AJAX/# or nofollow links; robots.txt
D1. Multi-filter combo with demand/womens-running-shoes/?filter_brand=hoka (gender + brand)1 confirmed (+ guesses)Index as a landing pageSame as C1
D2. Multi-filter combo with no demand/running-shoes/?filter_brand=nike&filter_color=red~50,000 with 2 filters; 500,000+ with 3 or morePhase 1: noindex → Phase 2: blockSame as C3
D3. Same combo in another order, case or encoding/running-shoes/?filter_color=red&filter_brand=nike×2 for every 2-filter combo, ×6 for 3 filtersNever serve. 301 to the one standard orderPHP normalizing rule (3.3)
D4. Filtered pagination/running-shoes/page/3/?filter_brand=asics~×3 of each filter group (avg. 40 products per category)Same decision as its filter groupCovered by the same rules
E. Empty combo/running-shoes/?filter_color=purple&filter_size=4740–60% of multi-filter combos (guess)Return a real 404 and never link to itPHP 404 rule; "hide empty options" in the filter plugin; blocked in Phase 2

Why each decision

  • Action URLs (A1, A2): They change cart or wishlist state, have no content of their own, and take 6% of your crawl. Google has filed bugs against WordPress plugins for exactly this. WooCommerce fixed its side, so your hits likely come from an outdated WooCommerce, an old theme template or the wishlist plugin. Blocking them loses nothing.
  • Sort (B1): Same products in a different order is a pure duplicate, and nobody searches for "running shoes by popularity". Your example ?filter_size=42&filter_color=black&orderby=price shows the filter links carry orderby along, which multiplies every combo.
  • Price, rating, in stock (B2): None of your demand queries use them, and number ranges create endless URLs. If "running shoes under 100" turns out to have demand later, build a static page for it. Don't index the slider URL.
  • Single filters with demand (C1, D1): 'nike running shoes', 'red running shoes', 'women's hoka running shoes' and 'asics trail shoes' are your proven queries. A parameter URL makes a weak landing page: it has the generic "Running Shoes" title and no intro, and filter plugins change their URL format. A static page gets its own title, H1, intro and internal links.
  • Gender (C2): You already have /womens-running-shoes/. The filter URL competes with your own category for the same query.
  • Size and other single values (C3): I guess they have no search demand ("size 42 running shoes" is rare), and the pages are thin copies of the category.
  • Multi-filter combos (D2, D3, D4): This is your biggest crawl sink. With only ~40 products per category, most combos show 0–3 products, and order variants double the count again. Your facts say not to put the same filter in the URL in different ways.
  • Empty combos (E): A "No products found" page with a 200 status is a soft 404. A real 404 tells Google to drop it and stop coming back.

robots.txt vs noindex/canonical: the trade-off for your store

  • robots.txt saves crawl budget but hides the page. Google can't see a noindex, canonical, 301 or 404 on a blocked URL. A blocked URL that already has links can stay in the index as "Indexed, though blocked by robots.txt".
  • noindex and canonical clean the index, but Google has to keep crawling to see them. That means no crawl savings while they work.
  • Your main problem is crawl (47% waste and slow product discovery), so the end state is robots.txt. But you probably have some filter URLs indexed, maybe ranking (guess #3), and your new landing pages need their 301s to be seen. So the order matters:
    1. Action URLs: block now. There is nothing for Google to see (no content, no canonical needed). If the Performance report shows impressions for add-to-cart or add_to_wishlist URLs, wait 2 weeks with noindex first.
    2. Filter, sort, price, rating and stock URLs: use noindex, canonical and 301 for 4–6 weeks, then block them.
    3. Old URLs that 301 to landing pages: they stay crawlable forever through Allow lines, so the redirect keeps passing signals.
  • Shortcut: if the Performance report (Page filter: URLs containing ?filter_) shows about 0 impressions and fewer than ~50 such URLs are indexed, skip the wait. Add the Phase 2 lines in week 1, right after the landing pages go live.
  • Don't combine noindex with a canonical that points to a different URL. That sends Google mixed signals, so the code below prints no canonical on noindexed URLs.

2. Landing pages for valuable combos

Confirmed by your search demand

Search queryNew clean URLOld URL(s) that 301 hereTitle tagH1
nike running shoes/nike-running-shoes//running-shoes/?filter_brand=nikeNike Running Shoes for Men & Women – YourStoreNike Running Shoes
red running shoes/red-running-shoes//running-shoes/?filter_color=redRed Running Shoes – Nike, ASICS, Hoka & More – YourStoreRed Running Shoes
women's hoka running shoes/womens-hoka-running-shoes//womens-running-shoes/?filter_brand=hoka, /running-shoes/?filter_gender=women&filter_brand=hokaWomen's Hoka Running Shoes – YourStoreWomen's Hoka Running Shoes
asics trail shoes/asics-trail-shoes//trail-shoes/?filter_brand=asicsASICS Trail Running Shoes – YourStoreASICS Trail Shoes

The URLs are flat on purpose, to match your existing /womens-running-shoes/ pattern. Flat URLs also avoid WordPress's duplicate-slug problem (two child categories can't both be called asics). In the red page title, list only brands you actually stock in red.

Guessed candidates: check demand before building

Query (guess)URLWhy I think so
asics running shoes/asics-running-shoes/Your /running-shoes/page/3/?filter_brand=asics URL means ASICS fills 3+ pages (~25+ products) in running shoes
hoka running shoes/hoka-running-shoes/The unisex query is usually bigger than the women's one you already have
women's nike running shoes/womens-nike-running-shoes/Combines two of your demand signals (Nike + women's category)
black running shoes/black-running-shoes/Black is usually the top color query for running shoes

Check them in Search Console (Performance → Queries containing the brand or color) or a keyword tool.

Rules for every landing page

  • Build it only if the query has real demand AND the page has at least 8 products (my guess at a threshold) AND fewer than ~80% of its products overlap with an existing category.
  • Unique content: its own title, H1 and meta description, plus an 80–150-word intro above the product grid. Keep it short so products stay above the fold on mobile. An optional FAQ can go below the grid.
  • Sample intro for /nike-running-shoes/ (fill in the brackets): "Shop [32] Nike running shoes for men and women, from everyday trainers like the [model] to cushioned long-run shoes like the [model]. Filter by size and color, read our [Nike fit note], and get [free 30-day returns]. Prefer max cushioning? See our [women's Hoka running shoes] or browse [all running shoes]."
  • Internal links:
    • Parent category: add a "Popular: Nike · ASICS · Hoka · Red" row above the grid on /running-shoes/ and /trail-shoes/.
    • Main menu: a Brands dropdown.
    • Related landing pages: link them to each other.
    • Product pages: a line like "More Nike running shoes →".
    • Blog or guide posts.
  • Canonical: each page is self-canonical. Page 2+ (/nike-running-shoes/page/2/) is also self-canonical, not pointed at page 1. Every landing page goes in the XML sitemap.
  • Out of stock: never 404 a landing page just because stock ran out. Keep a 200 status, show out-of-stock items and link to alternatives. Only if you stop selling the brand, 301 the page to its parent category.
  • Filters on landing pages still work, but those filtered URLs follow the same noindex/block rules.

How to build them in WooCommerce

  1. Products → Categories → Add new: name it "Nike Running Shoes", use the slug nike-running-shoes, leave no parent (so the URL stays flat like /womens-running-shoes/), and paste the intro into Description. Check that your theme shows the description above the products.
  2. Yoast box on the category: set the SEO title and meta description.
  3. Assign products: go to Products, filter by "Running Shoes", tick the Nike products, then Bulk actions → Edit → add the category. Then add the auto-assign snippet (Rule 6 below) so new products join automatically. That also gives new products an extra internal link on day one.
  4. Caution: if your product URLs include the category, keep Yoast's primary category set to the main category. Otherwise adding landing categories can change product URLs.
  5. Request indexing for each page in URL Inspection once it's live.

For 30+ pages later, use a filter plugin with an SEO landing-page feature or custom rewrite rules. For ~8 pages, categories are simpler and native.


3. Rules and code

3.1 robots.txt

Edit it in Yoast SEO → Tools → File editor (Rank Math: General Settings → Edit robots.txt). If a physical robots.txt exists in your web root, it overrides WordPress's virtual one. Keep any existing lines you have.

# shop.example.com: PHASE 1 (deploy now)
User-agent: *
Disallow: /wp-admin/
Allow: /wp-admin/admin-ajax.php

# Action URLs: cart, wishlist (they never need a noindex/canonical to be seen)
Disallow: /*?*add-to-cart=
Disallow: /*?*add_to_cart=
Disallow: /*?*add_to_wishlist=
Disallow: /*?*remove_from_wishlist=
Disallow: /*?*remove_item=
Disallow: /*?*undo_item=
# Only if you have a compare plugin (guess: you don't):
# Disallow: /*?*action=yith-woocompare

Sitemap: https://shop.example.com/sitemap_index.xml
# PHASE 2 (week 4-6): add under the action lines once the noindex/301s are processed
Disallow: /*?*filter_
Disallow: /*?*query_type_
Disallow: /*?*orderby=
Disallow: /*?*min_price=
Disallow: /*?*max_price=
Disallow: /*?*rating_filter=

# Old URLs that now 301 to landing pages stay crawlable, so Google keeps seeing the redirect.
# Longer (more specific) Allow rules beat the shorter Disallow; $ = exact end of URL.
Allow: /running-shoes/?filter_brand=nike$
Allow: /running-shoes/?filter_color=red$
Allow: /running-shoes/?filter_gender=women$
Allow: /womens-running-shoes/?filter_brand=hoka$
Allow: /trail-shoes/?filter_brand=asics$

Clean URLs (categories, /page/2/, landing pages, products) contain no ?, so none of these lines touch them. /*?*filter_ also covers filtered pagination like /running-shoes/page/3/?filter_brand=asics and filter_stock_status.

3.2 Canonical logic

Page type                                     robots meta        canonical
Category / shop, no params                    index, follow      self (clean URL)
Category page 2+   /running-shoes/page/2/     index, follow      self (NOT page 1)
Landing page       /nike-running-shoes/       index, follow      self
Sort only          ?orderby=popularity        index, follow      clean category (+ /page/N/)
Tracking only      ?utm_source=...            index, follow      clean URL
Any filter_/query_type_/price/rating param    noindex, follow    none (never mix noindex + cross-canonical)
Filter combo with 0 products                  404 status         none
Product page                                  index, follow      self, no params

Save the code below as wp-content/mu-plugins/facet-seo.php. Test on staging first.

<?php
/**
 * Plugin Name: Facet SEO rules (shop.example.com)
 * Assumes Yoast SEO (guess). Rank Math hooks are noted in comments.
 */
if ( ! defined( 'ABSPATH' ) ) exit;

/** Classify a query parameter (names taken from your URLs). */
function fseo_param_type( $key ) {
    $key = strtolower( $key );
    if ( in_array( $key, array( 'add-to-cart', 'add_to_cart', 'add_to_wishlist', 'remove_from_wishlist', 'remove_item', 'undo_item' ), true ) ) return 'action';
    if ( 0 === strpos( $key, 'filter_' ) || 0 === strpos( $key, 'query_type_' ) ) return 'filter';
    if ( in_array( $key, array( 'min_price', 'max_price', 'rating_filter' ), true ) ) return 'range';
    if ( 'orderby' === $key ) return 'sort';
    return 'other'; // utm_*, gclid, etc.
}

function fseo_types() {
    $types = array();
    foreach ( array_keys( $_GET ) as $key ) {
        $types[ fseo_param_type( $key ) ] = true;
    }
    return $types;
}

function fseo_is_listing() {
    return function_exists( 'is_shop' ) && ( is_shop() || is_product_taxonomy() );
}

function fseo_is_filtered() {
    $t = fseo_types();
    return isset( $t['filter'] ) || isset( $t['range'] );
}

/** Clean URL of the current listing, keeping /page/N/. */
function fseo_clean_url() {
    $url = is_shop() ? get_permalink( wc_get_page_id( 'shop' ) ) : get_term_link( get_queried_object() );
    if ( is_wp_error( $url ) || ! $url ) return '';
    $paged = (int) get_query_var( 'paged' );
    if ( $paged > 1 ) {
        $url = trailingslashit( $url ) . user_trailingslashit( 'page/' . $paged, 'paged' );
    }
    return $url;
}

/* Rule 1: filter, price, rating, stock URLs -> noindex, follow (Phase 1) */
add_filter( 'wpseo_robots', function ( $robots ) {
    return ( fseo_is_listing() && fseo_is_filtered() ) ? 'noindex, follow' : $robots;
} );
// Rank Math: 'rank_math/frontend/robots' -> return array( 'index' => 'noindex', 'follow' => 'follow' )

/* Rule 2: canonical */
add_filter( 'wpseo_canonical', function ( $canonical ) {
    if ( ! fseo_is_listing() ) return $canonical;
    if ( fseo_is_filtered() ) return false;   // noindexed: print no canonical
    $clean = fseo_clean_url();                 // sort-only / tracking-only / no params
    return $clean ? $clean : $canonical;       // clean category or landing URL; self on page 2+
} );
// Rank Math: same logic on 'rank_math/frontend/canonical'

3.3 Other rules

Rule 3: one standard parameter format, plus 301s from old filter URLs to landing pages. Add this to the same file. Standard order: gender → brand → color → size → stock → other attributes → query_type_* → min_price → max_price → rating_filter → orderby. Keys and values are lowercase, multi-values are sorted (black,red), empty params are dropped, and the default sort (menu_order) is dropped.

function fseo_rank( $key ) {
    $fixed = array(
        'filter_gender' => 1, 'filter_brand' => 2, 'filter_color' => 3,
        'filter_size' => 4, 'filter_stock_status' => 5,
        'min_price' => 30, 'max_price' => 31, 'rating_filter' => 32, 'orderby' => 40,
    );
    if ( isset( $fixed[ $key ] ) ) return $fixed[ $key ];
    if ( 0 === strpos( $key, 'filter_' ) ) return 10;
    if ( 0 === strpos( $key, 'query_type_' ) ) return 20;
    return 50;
}

add_action( 'template_redirect', function () {
    if ( ! fseo_is_listing() || empty( $_GET ) ) return;
    $t = fseo_types();
    if ( isset( $t['action'] ) || isset( $t['other'] ) ) return; // leave cart actions and tracking links alone

    $params = array();
    foreach ( $_GET as $key => $value ) {
        if ( ! is_string( $value ) ) return;
        $key   = strtolower( $key );
        $value = wp_unslash( $value );
        $vals  = in_array( $key, array( 'min_price', 'max_price' ), true )
            ? array( preg_replace( '/[^0-9.]/', '', $value ) )
            : array_map( 'sanitize_title', explode( ',', $value ) );
        $vals  = array_values( array_unique( array_filter( $vals, 'strlen' ) ) );
        if ( ! $vals || ( 'orderby' === $key && 'menu_order' === $vals[0] ) ) continue;
        sort( $vals );
        $params[ $key ] = implode( ',', $vals );
    }
    uksort( $params, function ( $a, $b ) {
        return array( fseo_rank( $a ), $a ) <=> array( fseo_rank( $b ), $b );
    } );
    $parts = array();
    foreach ( $params as $k => $v ) $parts[] = $k . '=' . $v;
    $normal = implode( '&', $parts );

    $base = fseo_clean_url();
    if ( ! $base ) return;
    $path = wp_parse_url( $base, PHP_URL_PATH );

    // Old parameter URLs -> landing pages / real categories (page 1 only)
    $landing = array(
        '/running-shoes/?filter_brand=nike'                     => '/nike-running-shoes/',
        '/running-shoes/?filter_color=red'                      => '/red-running-shoes/',
        '/running-shoes/?filter_gender=women'                   => '/womens-running-shoes/', // guess #4
        '/running-shoes/?filter_gender=women&filter_brand=hoka' => '/womens-hoka-running-shoes/',
        '/womens-running-shoes/?filter_brand=hoka'              => '/womens-hoka-running-shoes/',
        '/trail-shoes/?filter_brand=asics'                      => '/asics-trail-shoes/',
    );
    $key = $path . '?' . $normal;
    if ( isset( $landing[ $key ] ) ) {
        wp_safe_redirect( home_url( $landing[ $key ] ), 301 );
        exit;
    }

    // Same filters in another order / case / encoding -> one standard URL
    $raw = isset( $_SERVER['QUERY_STRING'] ) ? $_SERVER['QUERY_STRING'] : '';
    if ( $normal !== $raw ) {
        wp_safe_redirect( $normal ? $base . '?' . $normal : $base, 301 );
        exit;
    }
}, 5 );

Rule 4: a filter combo with 0 products returns a real 404. The page still shows "No products found" and the filters, so users can change their choice. This applies only to parameter URLs, never to landing pages.

add_action( 'template_redirect', function () {
    global $wp_query;
    if ( fseo_is_listing() && fseo_is_filtered() && 0 === (int) $wp_query->found_posts ) {
        status_header( 404 );
        nocache_headers();
    }
}, 20 );

This works when the plugin filters the main WooCommerce query on page load, which is what Googlebot fetches. If your plugin only filters by AJAX after load, use its own "no results" hook instead.

Rule 5: filter links (nofollow or # fragments), set in your filter plugin's settings.

  • Best option: turn on AJAX filtering with hash (#) URLs or no-link mode, for example /running-shoes/#filter_brand=nike. Google ignores everything after #, so filters stop creating new crawlable URLs.
  • If plain <a href="?filter_..."> links must stay: put rel="nofollow" on every filter, sort and price link, consistently. One followed link anywhere reopens the door, for example in "clear filter" links, breadcrumbs or a "related" widget. WooCommerce's own legacy filter widget already adds nofollow, but many third-party plugins don't, so check view-source. nofollow is only a hint, which is why robots.txt is the final step.
  • Point valuable filters at clean URLs. If the plugin allows custom links, the "Nike" option on /running-shoes/ should go straight to /nike-running-shoes/ and "Women" straight to /womens-running-shoes/. If not, use the "Popular" link row from section 2.
  • Hide or disable options with 0 products ("hide empty terms"), so a link like ?filter_color=purple&filter_size=47 never gets created.
  • Stop carrying orderby and price into filter links, if the plugin has that option. That is where URLs like ?filter_size=42&filter_color=black&orderby=price come from (guess).

Rule 6: auto-assign products to landing categories. Attribute names pa_brand and pa_color are guessed from your filter_brand and filter_color params.

function fseo_landing_rules() {
    // landing category slug => array( category the product must be in, attribute terms it must have )
    return array(
        'nike-running-shoes'        => array( 'running-shoes',        array( 'pa_brand' => 'nike' ) ),
        'red-running-shoes'         => array( 'running-shoes',        array( 'pa_color' => 'red' ) ),
        'womens-hoka-running-shoes' => array( 'womens-running-shoes', array( 'pa_brand' => 'hoka' ) ),
        'asics-trail-shoes'         => array( 'trail-shoes',          array( 'pa_brand' => 'asics' ) ),
    );
}

function fseo_assign_landing_cats( $product_id ) {
    foreach ( fseo_landing_rules() as $slug => $rule ) {
        $landing = get_term_by( 'slug', $slug, 'product_cat' );
        if ( ! $landing ) continue; // create the category first
        list( $cat, $attrs ) = $rule;
        $match = has_term( $cat, 'product_cat', $product_id );
        foreach ( $attrs as $tax => $term ) {
            $match = $match && has_term( $term, $tax, $product_id );
        }
        if ( $match ) {
            wp_set_object_terms( $product_id, (int) $landing->term_id, 'product_cat', true );
        } else {
            wp_remove_object_terms( $product_id, (int) $landing->term_id, 'product_cat' );
        }
    }
}
add_action( 'woocommerce_new_product', 'fseo_assign_landing_cats' );
add_action( 'woocommerce_update_product', 'fseo_assign_landing_cats' );
// Existing products: select all in Products -> Bulk actions -> Edit -> Update (runs the hook once).

Rule 7: find and fix the source of the action URLs (WooCommerce steps).

  1. Update WooCommerce, your theme, the filter plugin and the wishlist plugin, on staging first.
  2. Go to WooCommerce → Status → System status → Templates. If your theme overrides loop/add-to-cart.php with an outdated copy, update it. An old override can bring back the crawlable add-to-cart links that WooCommerce fixed.
  3. Go to WooCommerce → Settings → Products → General and tick "Enable AJAX add to cart buttons on archives".
  4. Wishlist plugin: turn on AJAX mode. Then open view-source on /trail-shoes/ and search for add_to_wishlist=. If plain href links remain, report it to the developer, since Google files bugs for exactly this. The robots.txt line protects you in the meantime.
  5. Look for parameters you don't know about: search view-source of a category page for ?add, action=, compare and remove_. Also check Screaming Frog's URL → Parameters tab after a crawl, and add any new action param to robots.txt.

Rule 8: help new products get found (your 2–3 week delay).

  • Make sure the Yoast product sitemap has lastmod and contains no ? URLs.
  • Submit sitemap_index.xml in Search Console.
  • Link new products from the homepage or a "New in" block for their first 2 weeks.
  • Clear your page cache (WP Rocket, LiteSpeed or Cloudflare) after deploying. Then confirm that the 404s and 301s aren't being served from cache as 200.

4. Before and after test plan

Rollout order

WhenWhat
Week 0Take the baseline measurements below; test everything on staging
Week 1Phase 1: robots.txt action lines, Rule 7 fixes, mu-plugin (Rules 1–4, 6), landing pages + 301s, filter link changes (Rule 5), sitemap check
Weeks 2–5Weekly checks: Pages report, Performance report, logs
Weeks 4–6Phase 2: add the filter/sort/price robots.txt lines once ?filter_ URLs show about 0 impressions and mostly sit under "Excluded by 'noindex' tag" or "Page with redirect"
Weeks 6–12"After" measurements and comparison

Before (baseline)

  1. Crawl the site with Screaming Frog. Turn on "Respect robots.txt" and "Follow internal nofollow", so you see the full URL space Google can discover. Record:
    • total URLs and URLs with ?, by parameter (URL → Parameters)
    • status codes, indexability, canonicals and meta robots
    • how many filter pages show "No products found" with a 200 status
  2. Search Console Crawl Stats (Settings → Crawl stats, 90 days). Record:
    • total requests per day and average response time
    • requests by response code and by purpose (Discovery vs Refresh)
    • host status
    • save the example URLs
  3. Pages report: export the indexed examples and count the URLs containing ?. In the Performance report, add the Page filter "URLs containing ?filter_", then orderby= and add-to-cart, to see which parameter URLs get impressions. This answers guess #3.
  4. New product speed: in URL Inspection, check 10 products published in the last 30 days and compare "Last crawl" and indexed status with the publish date. Your baseline is 2–3 weeks.
  5. Logs: get 30 days of raw access logs from your host and run the command below. Verify Googlebot by reverse DNS (googlebot.com or google.com), because fake Googlebot user agents are common.
# Googlebot hits by URL group (Apache/Nginx combined log format)
grep -i 'googlebot' access.log | awk '{print $7}' | awk '
  /add-to-cart=|add_to_cart=|add_to_wishlist=|remove_item=/ {a++; next}
  /filter_|query_type_/                                     {f++; next}
  /orderby=/                                                {s++; next}
  /min_price=|max_price=|rating_filter=/                    {p++; next}
  /\?/                                                      {o++; next}
                                                            {c++}
  END { t=a+f+s+p+o+c; if (!t) exit;
        printf "action %.1f%% | filter %.1f%% | sort %.1f%% | price/rating %.1f%% | other-param %.1f%% | clean %.1f%% | total %d\n",
        100*a/t, 100*f/t, 100*s/t, 100*p/t, 100*o/t, 100*c/t, t }'

After: expected results for your 12 example URLs

Check status codes and tags with curl (it ignores robots.txt, which is what you want here):

B="https://shop.example.com"
for u in \
  "/running-shoes/?filter_brand=nike" \
  "/running-shoes/?filter_brand=nike&filter_color=red" \
  "/running-shoes/?filter_color=red&filter_brand=nike" \
  "/running-shoes/?filter_size=42&filter_color=black&orderby=price" \
  "/running-shoes/?orderby=popularity" \
  "/running-shoes/?min_price=50&max_price=100" \
  "/running-shoes/page/3/?filter_brand=asics" \
  "/running-shoes/?filter_brand=asics&filter_gender=women" \
  "/running-shoes/?filter_color=purple&filter_size=47" \
  "/womens-running-shoes/?filter_brand=hoka"
do
  curl -s -o /tmp/p.html -w "%{http_code} %{redirect_url}  $u\n" "$B$u"
  grep -io '<meta name="robots"[^>]*>\|<link rel="canonical"[^>]*>' /tmp/p.html
done

Check robots.txt blocking with URL Inspection's live test ("Blocked by robots.txt") and the robots.txt report in Search Console settings. Or use Screaming Frog list mode with "Respect robots.txt" on.

URLAfter Phase 1After Phase 2
/running-shoes/?filter_brand=nike301 → /nike-running-shoes/301 (still crawlable via Allow)
/running-shoes/?filter_brand=nike&filter_color=red200, noindex, no canonicalBlocked by robots.txt
/running-shoes/?filter_color=red&filter_brand=nike301 → ?filter_brand=nike&filter_color=redBlocked
/running-shoes/?filter_size=42&filter_color=black&orderby=price301 → ?filter_color=black&filter_size=42&orderby=price, then 200 noindexBlocked
/running-shoes/?orderby=popularity200, canonical → /running-shoes/Blocked
/running-shoes/?min_price=50&max_price=100200, noindexBlocked
/running-shoes/page/3/?filter_brand=asics200, noindexBlocked
/running-shoes/?filter_brand=asics&filter_gender=women301 → ?filter_gender=women&filter_brand=asics, then 200 noindexBlocked
/trail-shoes/?add-to-cart=1882Blocked by robots.txt (still works for shoppers)Blocked
/trail-shoes/?add_to_wishlist=1882Blocked by robots.txtBlocked
/running-shoes/?filter_color=purple&filter_size=47404 (and no longer linked)Blocked
/womens-running-shoes/?filter_brand=hoka301 → /womens-hoka-running-shoes/301 (Allow)

The landing pages (/nike-running-shoes/, /red-running-shoes/, /womens-hoka-running-shoes/, /asics-trail-shoes/) should return 200, index, a self-canonical, and appear in the sitemap.

Metrics to compare

MetricWhereBeforeTarget after Phase 2 (guess)
Googlebot hits to ?filter_ / ?orderby=Logs, Crawl Stats41%Under 5%
Googlebot hits to action URLsLogs6%About 0%
Hits to products, categories and landing pagesLogs~50%85%+
Time for a new product to be crawled and indexedURL Inspection (10 new products)2–3 weeksUnder 7 days
Indexed URLs with ?Pages report export, Performance page filterYour baselineAbout 0
Crawlable URLs in a full crawlScreaming FrogYour baseline (guess: 50,000+)~2,700 (2,400 products + 60 categories + pagination + landing pages) + your content pages
Landing pagesURL Inspection, Performance (4 queries)Not builtAll indexed within 2–3 weeks; impressions rising by week 8

"Blocked by robots.txt" in the Pages report will grow after Phase 2. That is expected, not an error.

Red flags and what to do

  • A landing page shows "Duplicate, Google chose different canonical": its products are too close to the parent category or its intro is too thin. Add unique content or drop the page.
  • "Indexed, though blocked by robots.txt" keeps growing: a followed internal link still points to parameter URLs. Find it in Screaming Frog (Inlinks on those URLs) and fix it with Rule 5.
  • Clicks for brand queries or /running-shoes/ drop more than ~15% for 2+ weeks (guess threshold): a blocked parameter URL was probably ranking. Map it to a landing page with a 301 and add an Allow line for it.
  • Filter combos that do have products return 404: your plugin's query doesn't match found_posts. Turn off Rule 4 and use the plugin's own "no results" hook.
  • Crawl Stats host status shows errors or slow responses after launch: check that the caching and redirect rules aren't looping.

The prompt

First lines open so you can see how it is built. The rest opens after purchase.

the prompt · 550 words7 sections
#ROLE
You are an ecommerce technical SEO expert in faceted navigation and crawl budget. Fix how my filter and parameter URLs are crawled and indexed.

#INPUTS
Fill in every line. Leave a line blank if you don't know it.
- Store URL: [STORE URL]
- Platform and filter plugin or app: [e.g., WooCommerce + filter plugin, Shopify + Search & Discovery, Magento layered navigation]
- Number of products and categories: [NUMBERS]
Full prompt opens after purchase
Sections inside: #ROLE #INPUTS #FACTS #PROCESS #OUTPUT FORMAT #RULES #QUALITY CHECK

How to use it

  1. Buy, then open it in your account.
  2. Copy the prompt into ChatGPT, Claude or Gemini.
  3. Replace the 7 inputs with your product.
  4. Run it. Use the output. Re-run with a different tone if you like.

Pro tips

  • Give it 10 to 20 real filter URLs, including the weird ones. Odd combinations are where crawl waste hides.
  • List the filter combos people really search for. Those become proper landing pages instead of being blocked.
  • After the changes, compare Crawl Stats for 4 weeks. The share of filter URLs should fall.

Before you buy

Will it work for my product?
Yes, if you can fill the 7 inputs. If the output is bad with your inputs, email us: we fix the prompt and refund you.
Do I download a file?
No. It lives in your account with a copy button, and updates when we improve it.
Which model is best?
Best on Claude. Works in ChatGPT, Claude and Gemini.

Works well with this

Prompts people use in the same campaign.

More in Crawling & Indexing

See all in this sub-category

Buying more than two? Lifetime is cheaper.

Every prompt, every category, forever. $59 once. Nothing to download, nothing to renew.

Get lifetime · $59

This prompt

$3$7

  • ✓ Instant access in your account, with a copy button
  • ✓ Example input and real output included
  • ✓ 7-day money-back, no form

Or get every prompt, forever

Lifetime Access · $59 $149 — all categories, all future prompts, rewrites included.

Get lifetime access

Card or PayPal · taxes at checkout · nothing to download

Not the one you need?

Browse every prompt by category and sub-category.

Browse all prompts
Lifetime $59 →