Skip to content

Search Console Regex Filters: Group Queries and Pages

Use Search Console regular expressions to group related queries and URLs, test what each pattern includes and save a repeatable comparison.

Query strips sorted through a simple pattern stencil
Jack Lee
4 Min Read
Share
On This Page

A regex filter in Google Search Console groups queries or page URLs by a text pattern. Use it when one ordinary contains filter cannot express the group you need, such as searches containing either “repair” or “service”.

The useful part is not a complicated expression. It is a small pattern you can test, reuse and explain.

Apply a Regex Filter

  1. Open the intended Search Console Performance report.
  2. Select + Add filter, then Queries or Pages.
  3. Choose Custom (regex).
  4. Enter the pattern and choose the matching or non-matching option.
  5. Apply it, then inspect the rows it actually returns.

Keep the date range, search type, country and device scope in your notes. A correct pattern can return different totals after another filter changes. The Search Console basics guide covers the report setup.

Learn the Small Syntax Set You Need

Search Console uses RE2 regex syntax and matches part of the text by default. Matching is case-insensitive unless you explicitly change that behavior. Use Queries for the first three recipes below and Pages for the URL recipes.

PatternMeaningExample match
repair|serviceEither text appears anywherephone repair kl
^phone repair$The complete query is exactly this phrasephone repair
^(iphone|samsung) repairThe query starts with either grouped phrasesamsung repair near me
/repairs/A URL contains this literal path fragmenthttps://example.com/repairs/phones/
\?A literal question markA URL containing a query string

The pipe means “or”. Parentheses keep alternatives together. A caret anchors the beginning and a dollar sign anchors the end. A dot means any character, so escape a literal dot as \..

Enter only the pattern in Search Console. JavaScript-style delimiters such as /pattern/i are not the field's format. A slash in a URL-path example is literal URL text, not a delimiter you add around every expression.

Build a Repair Query Group

For a phone-repair shop, begin with repair|service. Before interpreting its traffic, test what it includes and excludes.

Test queryExpected resultReason
iphone repair klIncludeContains repair
phone service centreIncludeContains service
buy phone onlineExcludeContains neither alternative
self service kioskInclude, but review relevanceA text match does not establish service intent

Check actual returned queries for unintended matches. Add specific alternatives only when the business question needs them. You may need a separate group for Malay wording such as baiki; regex does not translate words or identify intent for you.

Use the resulting subset in the Search Console opportunity workflow. The filter creates a working group; it does not decide which page deserves investment.

Match the URL That Is Reported

The Pages dimension contains URLs, not just paths. A pattern starting ^/repairs/ will not match a full URL beginning https://. Inspect the actual reported strings before adding a start anchor.

To constrain the host and section, an example pattern is ^https://example\.com/repairs/. Replace the example host with your real host. Use the shorter /repairs/ only when matching that fragment anywhere is appropriate.

Most performance data is assigned to the canonical URL. A redirected or alternate address may not have the independent row you expect. Investigate canonical selection before treating a missing row as lost traffic.

Exclude and Interpret Carefully

For a simple exclusion, select the non-matching option. RE2 does not support lookahead, lookbehind or backreferences, so a negative-lookahead pattern copied from another regex engine can fail here.

Query filters omit anonymized queries, and row limits affect what you can retrieve. Matching and non-matching totals therefore need not add up to the unfiltered total. Do not present the two groups as a complete branded versus non-branded split.

Save the pattern, purpose, active filters and several expected matches and exclusions. If the subset changes unexpectedly, verify those tests before drawing conclusions about a traffic decline.

Frequently Asked Questions

Why Does My Regex Return No Rows?

Check the selected dimension, pattern syntax, anchors, dates and other filters. Test against the actual query or full URL string. No rows can also reflect reporting limits; it does not prove the text never occurred.

Are Search Console Regex Filters Case-Sensitive?

They are case-insensitive by default. The prefix (?-i) requests case-sensitive matching when the distinction is useful.

How Do I Exclude Several Words?

Join the words with a pipe, then choose the non-matching option. Test whether partial matches remove more queries than intended before using the total.

Can I Use Regex for a Complete Brand Traffic Split?

You can define a useful visible-query group, but not a complete census of all searches. Anonymized queries and reporting limits prevent that stronger claim.

Share This Article