Rank Math's "Focus Keyword not found in the URL" test

Rank Math's Focus Keyword in the URL test checks whether your post's URL contains the primary focus keyword, written as a slug. A pass reads "Focus Keyword used in the URL." A fail reads "Focus Keyword not found in the URL." Hyphens and underscores are treated the same, and the match works with or without small stop words.

Words in a URL are a small signal at most. Google recommends readable, descriptive URLs mainly because they help people. On a new post, matching the slug to the keyword is easy and sensible. On a published post, changing the URL to pass this test can cost more than it gains.

How the slug match works

Rank Math turns your focus keyword into slug form, lowercased with spaces replaced by hyphens, and looks for it in the URL. It tries two versions: one with stop words removed and one with them kept. For the keyword descale an espresso machine, both of these pass:

  • /descale-an-espresso-machine/
  • /descale-espresso-machine/

Underscores in the URL are normalized to hyphens before comparing, so descale_espresso_machine also matches, although hyphens are the better choice for readability and are what Google recommends.

Word order still matters. /espresso-machine-descaling/ fails for that keyword, because "descale espresso machine" is not contained in it. Only the primary focus keyword is checked. Rank Math's knowledge base notes that the test is disabled if your site does not use SEO-friendly permalinks, since a URL like /?p=123 has no words to match.

How much a keyword in the URL helps

Google's guidance on URL structure asks for simple, readable URLs that use words rather than long ID numbers, with hyphens between words. The reason given is usability: people can understand a URL like /descale-espresso-machine/ before they click, and it reads better when shared.

As a ranking signal, keywords in URLs are minor. Google's representatives have described them as a very lightweight factor, and Google often shows a breadcrumb-style path instead of the full URL in results. A well-written page with a slug like /p/2931/ can outrank a thin page with a perfect keyword slug.

So the test is more about habit than ranking: when you set a slug, make it describe the page.

Two more details follow from how the match works. The test searches the whole URL, not only the last segment, so on a child page like /services/espresso-repair/ a keyword in the parent path counts too. And a year in the slug, such as /best-espresso-grinders-2026/, passes today but forces a choice next year: change the URL and redirect it, or keep a slug that makes an updated post look out of date.

Changing a published URL safely, or not at all

On a new draft, edit the slug in the permalink field before publishing. Keep it short, drop filler words, and make it match what the page is about.

On a post that has been live for a while, the calculation changes. The old URL may have backlinks, bookmarks, internal links and a history in search results. Changing it means:

  1. every link to the old URL now depends on a redirect;
  2. search engines have to recrawl and transfer signals to the new address, which takes time;
  3. any internal links you forget to update add a redirect hop.

WordPress redirects some changed post slugs on its own, but not in every case, so never rely on that alone. If you do change a URL, add a 301 redirect from the old address in the same sitting and update your internal links. For most established posts, a failing test is a better trade than a URL change. See change permalinks without losing SEO for the full process.

Slugs and redirects in Hydrogen SEO

Hydrogen SEO does not score the URL for keywords. It does make the risky part safer: with Auto Redirection switched on in the Redirection Manager, changing the slug of a post, page or term automatically adds a 301 rule from the old address to the new one, tagged Auto, which you can edit or remove.

For drafting a clean slug, the free URL slug generator turns a title into a short, lowercase, hyphenated slug and drops filler words. Note that shorter URLs also help with Rank Math's separate URL length test, covered in Rank Math URL length.

Common questions

Does Rank Math require the exact keyword in the URL?

It requires the keyword words in order, as a slug. It accepts the version with stop words removed, and it treats underscores like hyphens, but reordered words do not pass.

Should I change old URLs to include the focus keyword?

Usually not. The ranking benefit is small, and changing a URL relies on redirects and recrawling. If you do change one, add a 301 redirect from the old URL straight away.

Why is the URL test missing from my Rank Math panel?

Rank Math disables it when the site does not use SEO-friendly permalinks. Switch to a structure such as post name under Settings, then Permalinks, and the test becomes available.