Focus Keyword Not Found in the URL: What Rank Math and Yoast Check, and What Google Says
Quick answer
Rank Math shows "Focus Keyword not found in the URL" when your first focus keyword, turned into a hyphenated string, does not appear as one unbroken run anywhere in the post's URL. Case and accents are ignored, but stop words, plurals and word order are not. Yoast checks each content word on its own. Google says keywords in the URL path "alone have hardly any effect beyond appearing in breadcrumbs," so I would not change a live URL just to clear the warning.
Key takeaways
- Rank Math 1.0.282 (Nov 10, 2026) shows focus keyword not found in the URL after testing the first focus keyword only. Its knowledge base labels the test "Primary Focus Keyword Only."
- Rank Math lowercases both sides and strips accents, then does a plain substring match against the full URL. A dropped "for," a plural or a new word order fails.
- Yoast SEO 28.8 checks content words one by one, in any order, after removing function words. Keyphrases of three or more content words pass with more than half.
- Of 14 slug cases for one keyword, Rank Math found the keyword in 7 and Yoast Free scored 10 of its 12 green, derived from each plugin's published source, not a live test.
- Google's SEO Starter Guide: keywords in the domain or URL path "alone have hardly any effect beyond appearing in breadcrumbs" (read Nov 13, 2026).
- WordPress 7.1.4 301-redirects a changed post slug, but not a page slug. In my judgment, changing a live URL to clear a 5-point warning rarely pays.
On this page (9)
What does "Focus Keyword not found in the URL" mean?
Rank Math shows "Focus Keyword not found in the URL" when your first focus keyword, turned into a hyphenated slug, is not found as one unbroken string anywhere in the post's full URL. The test is worth 5 points of the 100-point score.
The message comes from one test in Rank Math SEO, the free plugin, named keywordInPermalink. When it passes, the text reads "Focus Keyword used in the URL." I read the code of version 1.0.282, released Nov 10, 2026, which was the current version on WordPress.org on Nov 13, 2026. No WordPress install was involved and no plugin code was run. The test is in the default list for posts, and its maximum score is 5, passed through a filter named rankMath_analysis_keywordInPermalink_score.
Rank Math's knowledge base heads the section "Focus Keyword in the URL (Primary Focus Keyword Only)." The same page says the keyword in the URL "is another ranking signal that all search engines use." It also argues that the keyword shows users the result matches their search, a point closer to Google's own advice. On ranking, Google's guide puts it much lower, as quoted further down.
Here is the part of the shipped file that makes the decision, from the built analyzer.js in the 1.0.282 release:
// Rank Math SEO 1.0.282, assets/admin/js/analyzer.js (built file, GPL, line breaks added), URL test getResult n=e.getUrl().replace(/[-_]/gi,"-"),i=(0,Dr.cleanForSlug)(n), a=(0,o.includes)(i,(0,Dr.cleanForSlug)(e.getKeywordPermalink(t)))|| (0,o.includes)(i,(0,Dr.cleanForSlug)(e.getPermalinkWithStopwords(t)))
Read in order, the check does five things:
- Picks one keyword. The editor splits your focus keywords on commas. The first one gets the full test list, and the others get a shorter list that leaves the URL test out.
- Cleans the keyword. It is lowercased, apostrophes are removed, accents are removed, and spaces, dots and underscores become hyphens. "Crème brûlée recipe for beginners" becomes creme-brulee-recipe-for-beginners.
- Cleans the URL. The full permalink, domain included, has underscores turned into hyphens. Then cleanForSlug, a function Rank Math borrows from WordPress, lowercases it and strips accents.
- Matches. The test is a plain substring check, the lodash includes function. There are no word boundaries, no stop-word removal, no plurals and no reordering.
- Tries a second string that is the same string. A second function, getPermalinkWithStopwords, implies the first string was once meant to drop stop words, but in 1.0.282 both return the same value, so stop words are always kept.
// Rank Math SEO 1.0.282, assets/admin/js/analyzer.js (built file, GPL, line breaks added), how the keyword string is built
{key:"getKeywordPermalink",value:function(e){if(!1===this.keywordPermalink){
var t=e.getResearch("slugify"),r=e.getResearch("removePunctuation"),
n=this.getLower("keyword").replace(/\'/g,"").replace(/[-_.]+/g,"-");
this.keywordPermalink=t(r(n)),this.keywordPermalinkRaw=this.keywordPermalink}return this.keywordPermalink}},
{key:"getPermalinkWithStopwords",value:function(e){return!1===this.keywordPermalink&&this.getKeywordPermalink(e),this.keywordPermalinkRaw}}
One detail for anyone checking my reading. The readable source in Rank Math's GitHub repository, at commit f79a7f2, runs cleanForSlug on the keyword only. That commit is not the WordPress.org release. The built file that ships in the 1.0.282 release also runs it on the URL. I read the built file on WordPress.org's plugin repository, and the results below follow the shipped code.
How does Yoast's "Keyphrase in slug" check work?
Yoast SEO checks each content word of the focus keyphrase on its own, in any order, after dropping function words such as "for." One or two content words must all appear in the slug, and longer keyphrases need more than half.
The check is the slugKeyword assessment in Yoast SEO, the free plugin. I read version 28.8, released Oct 27, 2026, the stable version on WordPress.org on Nov 13, 2026. It scores 9 (green) on a pass, 6 (orange) when not enough words match, even if none do, and 3 (red) only when there is no keyphrase or no slug. Yoast's own scoring notes add that a partial match on a cornerstone post scores 3, not 6.
// Yoast SEO 28.8, packages/yoastseo/src/languageProcessing/researches/keywordCountInUrl.js, lines 24-27 (GPL)
const parsedSlug = parseSlug( paper.getSlug() );
const locale = paper.getLocale();
const keyphraseInSlug = findTopicFormsInString( topicForms, parsedSlug, false, locale, false );
// .../scoring/assessments/seo/UrlKeywordAssessment.js, lines 115-116 and 146
if ( this._keywordInSlug.keyphraseLength < 3 ) {
if ( this._keywordInSlug.percentWordMatches === 100 ) {
if ( this._keywordInSlug.percentWordMatches > 50 ) {
- Slug clean-up: hyphens and underscores become spaces.
- Keyphrase clean-up: lowercased, then function words are removed, unless the keyphrase is made only of function words. The English list includes "for," "with," "the," "how" and "to," and also words like "best" and "easy."
- Matching: each remaining word must appear as a whole word. The match ignores case, and accented letters are also tried in their plain form.
- Word forms: in the free plugin, "recipe" does not match "recipes." Yoast's matching notes say Premium recognizes "all possible forms of their keyphrase."
- Quotes: a keyphrase wrapped in double quotes switches to exact matching, so the whole phrase must appear as typed.
- Front page: the check does not run on the site's front page.
// Yoast SEO 28.8, packages/yoastseo/src/languageProcessing/helpers/morphology/buildTopicStems.js, lines 100-104 (GPL)
// Filter function words from the keyphrase. Don't filter if the keyphrase only consists of function words.
const wordsWithoutFunctionWords = keyphraseWords.filter( ( word ) => ! functionWords.includes( word ) );
if ( wordsWithoutFunctionWords.length > 0 ) {
keyphraseWords = wordsWithoutFunctionWords;
}
One quirk follows from line 146. For a keyphrase of three or more content words, the code only asks whether more than 50% appear. A slug with every word gets the same branch, so the message reads "More than half of your keyphrase appears in the slug. That's great!" even when all of it does. I confirmed the same comparison in the built analysis.js file shipped in the 28.8 release.
Is the focus keyword URL check case-sensitive?
No. Rank Math lowercases both the keyword and the URL before comparing them, so capitals never cause focus keyword not found in the URL, and Yoast's slug check matches with a case-insensitive pattern.
In Rank Math 1.0.282, the keyword is lowercased when it is set, and the URL goes through cleanForSlug, which ends in toLowerCase. In WordPress 7.1.4, the copy of cleanForSlug that Rank Math calls does exactly that on line 839 of url.js. WordPress also lowercases a slug when it saves a post: sanitize_title_with_dashes calls strtolower. So on a saved post, the slug is lowercase before any plugin reads it.
Case does matter to Google, but for a different reason. Google's URL structure guide says "Google Search's URL handling is case sensitive," so /APPLE and /apple are two URLs. That is a reason to keep URLs in one case, which WordPress already does.
Which slugs pass Rank Math's and Yoast's URL check?
For one keyword and 14 slug cases, Rank Math 1.0.282 finds the keyword in 7 and Yoast SEO 28.8 Free scores 10 of its 12 cases green, as derived from each plugin's published source code rather than a live test.
How I built it: I wrote the list of 14 cases to a file before tracing any outcome. The focus keyword is "Crème brûlée recipe for beginners" on https://example.com/ with the /%postname%/ structure. I traced each case through the code quoted above by hand. Then I checked the trace with a short script of my own that restates the same steps. No plugin code was installed or run; I read the source files as text.
| Case | Slug | Rank Math 1.0.282 | Yoast SEO 28.8 Free | The step that decides it |
|---|---|---|---|---|
| C01 Baseline | creme-brulee-recipe-for-beginners | Found | Green (9) | Same string; Yoast finds 4 of 4 content words |
| C02 Case | Creme-Brulee-Recipe-For-Beginners | Found | Green (9) | Both sides lowercased. WordPress lowercases it on save anyway |
| C03 Accents kept | crème-brûlée-recipe-for-beginners | Found | Green (9) | Accents stripped. WordPress strips them on save anyway |
| C04 Stop word dropped | creme-brulee-recipe-beginners | Not found | Green (9) | Rank Math needs "-for-"; Yoast removed "for" from the keyphrase |
| C05 Plural | creme-brulee-recipes-for-beginners | Not found | Green (9) | "recipe-for" is not inside "recipes-for"; Yoast finds 3 of 4, which is 75% |
| C06 Word order | beginners-creme-brulee-recipe | Not found | Green (9) | A substring keeps word order; Yoast ignores order |
| C07 Underscores | creme_brulee_recipe_for_beginners | Found | Green (9) | Both turn underscores into separators |
| C08 Keyword at the end | classic-creme-brulee-recipe-for-beginners | Found | Green (9) | Position is not checked |
| C09 Words after it | creme-brulee-recipe-for-beginners-with-video | Found | Green (9) | Extra words are not penalized |
| C10 Partial, 3 of 4 | creme-brulee-recipe | Not found | Green (9) | 75% is over Yoast's 50% line |
| C11 Partial, 2 of 4 | creme-brulee | Not found | Orange (6) | 50% is not over 50%. Red (3) on a cornerstone post |
| C12 Two keywords, other first | creme-brulee-recipe-for-beginners | Not found | n/a | Only "creme brulee tips" is URL-tested. Yoast Free takes one keyphrase |
| C13 Two keywords, this first | creme-brulee-recipe-for-beginners | Found | n/a | The first keyword matches; the second is never URL-tested |
| C14 Yoast keyphrase in quotes | creme-brulee-recipe-beginners | Not found | Orange (6) | Yoast's exact phrase needs "for." Rank Math has no quoted mode; the quotes are stripped and the slug lacks -for- |
Label for the table: derived from each plugin's published source (Rank Math SEO 1.0.282, assets/admin/js/analyzer.js; Yoast SEO 28.8, packages/yoastseo/src), not from a live WordPress test. Found and Not found are Rank Math's two messages. The Yoast column shows its traffic light and score. C14 is settled for Rank Math too: it has no quoted mode, and with or without the quote marks the keyword is creme-brulee-recipe-for-beginners, which the slug lacks.
Focus keyword URL check, 14 cases, Nov 13, 2026 (CSV)
Every case with the keyword, slug, each plugin's result, the deciding step and the open questions. Free to reuse with a link to this page.
Some outcomes depend on things the code alone cannot settle:
- Rank Math calls cleanForSlug from the WordPress install it runs on, not from its own files. I read the copy in WordPress 7.1.4. Another WordPress version could treat unusual characters differently, though not the plain letters, hyphens and underscores in this table.
- Rank Math builds its list of tests in PHP, and a site can change it with the rank_math/researches/tests filter. The URL test is also removed when you edit the page set as the static homepage. On the posts page, Rank Math removes content tests but keeps the URL test.
- Rank Math checks the full URL, domain and category path included, so a keyword that happens to appear in either one counts.
- Yoast Premium adds word forms, so "recipes" would match "recipe" in C05. Premium related keyphrases were not traced.
- Yoast removes function words only for languages that have a function word list. The table assumes an English site.
Does Google rank pages higher for keywords in the URL?
Barely. Google's SEO Starter Guide says keywords in the domain name or URL path "alone have hardly any effect beyond appearing in breadcrumbs," and it asks for "words in the URL that may be useful for users." My reading: that is a readability test, not an exact-match one.
The Starter Guide, last updated Dec 10, 2025 and read on Nov 13, 2026, makes two points that bear on URL keywords. Under "Use descriptive URLs" it says "Parts of the URL can be displayed in search results as breadcrumbs," and "Try to include words in the URL that may be useful for users." In its section "Things we believe you shouldn't focus on," it says: "From a ranking perspective, the keywords in the name of the domain (or URL path) alone have hardly any effect beyond appearing in breadcrumbs."
| What a plugin rewards | What Google's docs say | What it means (my reading) |
|---|---|---|
| Rank Math: the exact keyword string in the URL | "hardly any effect beyond appearing in breadcrumbs" | Readable words help the reader; the exact string has hardly any ranking effect on its own |
| Yoast: content words in the slug, any order | "include words in the URL that may be useful for users" | Close to Google's advice, if the words are ones readers use |
| Both: underscores count as word separators | "we recommend using hyphens (-) instead of underscores (_) to separate words in your URLs" | Neither plugin warns about underscores. Use hyphens |
| Both: case is ignored | "Google Search's URL handling is case sensitive" | WordPress already lowercases slugs |
| Rank Math: the domain counts too | Keywords "in the name of the domain (or URL path) alone have hardly any effect" | A keyword in the domain clears the warning and changes little for Google beyond breadcrumbs |
The hyphen and case quotes come from Google's URL structure guide, last updated Oct 21, 2026. Read together, the two guides ask for a URL a person can read, in one case, with hyphens between words. Either plugin can sit happily alongside that, and neither score adds to it.
Should you change a live URL to clear the warning?
No. Changing a published slug to clear focus keyword not found in the URL trades a 5-point plugin score for a redirect that Google has to process, and Google says keywords in the URL path alone have hardly any ranking effect. In my judgment, the trade rarely pays off.
If you do change a URL, Google's redirects guide is clear about how: "If you need to change the URL of a page as it is shown in search engine results, we recommend that you use a permanent server-side redirect whenever possible." Its guide to site moves, written for bigger changes, adds "Expect temporary fluctuation in site ranking during the move" and says to keep redirects "generally at least 1 year."
WordPress helps with posts but not with pages. In WordPress 7.1.4, a changed post slug is stored, and the old URL gets a 301 to the new one. The same function returns early for hierarchical post types, which includes pages. So a changed page slug returns a 404 unless you add a redirect yourself. Links within your own site, your sitemap and links from other sites still point at the old address either way.
// WordPress 7.1.4, wp-includes/query.php, wp_old_slug_redirect(), lines 1095-1098 and 1140 (GPL)
// Do not attempt redirect for hierarchical post types.
if ( is_post_type_hierarchical( $post_type ) ) {
return;
}
// ...
wp_redirect( $link, 301 ); // Permanent redirect.
If you cannot redirect, Google's Starter Guide names the fallback: "If you can't redirect, use the rel="canonical" link element instead." An old URL left live with a canonical tag pointing at the new one then shows in Search Console as alternate page with proper canonical tag. That status is harmless, but it is one more thing to watch for a 5-point score.
There are good reasons to change a slug, and they are about readers. A typo, a string of random IDs like Google's own bad example, a year that now misleads, or a page whose topic changed are all worth fixing with a redirect. A slug that reads well and only triggers focus keyword not found in the URL is not.
How do you clear the warning on a new post?
Set the slug before you publish: for Rank Math, put the first focus keyword in the slug as one run of words in the same order, and for Yoast, include each content word of the keyphrase in any order.
- Rank Math: make the keyword you care about the first one in the list. The URL test ignores the rest.
- Rank Math: keep the stop words in the slug if they are in the keyword, or drop them from the keyword too. "recipe for beginners" needs recipe-for-beginners in the URL.
- Rank Math: watch plurals. A singular keyword is found inside a plural slug only when the plural word is the keyword's last word, because "recipe" sits inside "recipes" only at the end of the string.
- Yoast: with three or more content words, more than half must be in the slug. With one or two, all of them must be.
- Rank Math: a shorter keyword passes more easily. Yoast: one or two content words must all appear, so a short keyphrase allows no misses. Either way, choose the keyword for the search, not for the score.
The same habit applies to every service page: decide the URL once, before launch, around the words a customer would use, and then leave it alone. Whether a focus keyword earns its place at all is a separate question. The guide on whether keywords still matter answers it from Google's own statements, including the Yoast focus keyphrase field.
Does Google use the Rank Math or Yoast SEO score?
No. Both scores are computed by JavaScript in your WordPress editor, from the draft you are editing. Google reads the published page, and its own verdicts show up in Search Console, not in a plugin panel.
Treat the two kinds of message differently. A Search Console status such as sitemap could not be read comes from Google, after Google tried and failed to fetch a file. "Focus Keyword not found in the URL" comes from a script that compared two strings in your editor. The first describes what Google saw. The second describes a rule the plugin's authors chose.
If you want an hour of SEO work that changes what Google can read, the JSON-LD on your homepage is a better candidate than a slug that already reads well. My crawl of top-site homepages shows what real sites put in Organization schema sameAs, the property that ties a site to its profiles elsewhere.
Is focus keyword not found in the URL a sign of a content problem?
Sometimes. When the page itself does not use the words its readers search for, the slug warning is a symptom: the title, headings and copy usually miss the same words, and a new slug alone changes little.
In that case the fix is the page, not the URL. Rewriting service pages around the questions buyers ask is the conversion-focused copy work I do. Disclosure: that is a service I sell, so weigh the source. If your page already answers the search in plain words, ignore the warning and keep the URL.
Sources
- WordPress.org Plugin Directory: Rank Math SEO readme (stable tag 1.0.282, Nov 10, 2026) (opens in a new tab) (verified Nov 2026)
- Rank Math SEO 1.0.282: assets/admin/js/analyzer.js, the built file in the release (opens in a new tab) (verified Nov 2026)
- Rank Math SEO on GitHub, commit f79a7f2: keywordInPermalink.js, lines 40-45 (opens in a new tab) (verified Nov 2026)
- Rank Math SEO on GitHub, commit f79a7f2: Paper.js, lines 384-412 (opens in a new tab) (verified Nov 2026)
- Rank Math SEO on GitHub, commit f79a7f2: classic/Assessor.js, lines 175-246 (first keyword only) (opens in a new tab) (verified Nov 2026)
- Rank Math Knowledge Base: Score 100/100 With Rank Math Post Tests (opens in a new tab) (verified Nov 2026)
- WordPress.org Plugin Directory: Yoast SEO readme (stable tag 28.8) (opens in a new tab) (verified Nov 2026)
- Yoast SEO on GitHub, 28.8: UrlKeywordAssessment.js, lines 115-172 (opens in a new tab) (verified Nov 2026)
- Yoast SEO on GitHub, 28.8: keywordCountInUrl.js, lines 14-33 (opens in a new tab) (verified Nov 2026)
- Yoast SEO on GitHub, 28.8: buildTopicStems.js, lines 100-104 (opens in a new tab) (verified Nov 2026)
- Yoast SEO on GitHub, 28.8: KEYPHRASE MATCHING.md (opens in a new tab) (verified Nov 2026)
- Yoast SEO on GitHub, 28.8: SCORING SEO.md, Keyphrase in slug (opens in a new tab) (verified Nov 2026)
- WordPress 7.1.4: wp-includes/js/dist/url.js, cleanForSlug, lines 835-840 (opens in a new tab) (verified Nov 2026)
- WordPress 7.1.4: wp-includes/query.php, wp_old_slug_redirect, lines 1075-1143 (opens in a new tab) (verified Nov 2026)
- Google Search Central: SEO Starter Guide (updated Dec 10, 2025) (opens in a new tab) (verified Nov 2026)
- Google Search Central: URL structure best practices (updated Oct 21, 2026) (opens in a new tab) (verified Nov 2026)
- Google Search Central: Redirects and Google Search (updated Apr 14, 2026) (opens in a new tab) (verified Nov 2026)
- Google Search Central: Site moves with URL changes (updated Aug 20, 2026) (opens in a new tab) (verified Nov 2026)
Topics & entities in this article
Frequently asked questions
No. In Rank Math 1.0.282 only the first focus keyword gets the URL test. The editor runs the full test list for the first keyword and a shorter list without the URL test for the rest. Rank Math's knowledge base labels the test "Primary Focus Keyword Only."
In Rank Math, yes. The keyword is matched as one hyphenated string with its stop words, so a slug without "for" fails a keyword that has it. Yoast removes function words such as "for" before matching, so the same slug passes there.
For a keyphrase of three or more content words, Yoast SEO 28.8 only checks whether more than 50% appear in the slug. A full match falls in the same branch, so it gets the "More than half" message with the top score of 9.
Hyphens. Google's URL structure guide recommends hyphens instead of underscores to separate words. Both Rank Math and Yoast treat underscores as separators, so neither warns you, and WordPress keeps underscores in a slug if you type them.
For posts, yes. WordPress 7.1.4 stores the old slug and sends a 301 redirect to the new URL. For pages and other hierarchical post types it does not, so a changed page slug needs a redirect you add yourself.
The focus keyphrase field is empty. Yoast SEO's message reads "No focus keyphrase was set for this page." Its slug check then scores red (3), because it needs both a keyphrase and a slug before it can compare them.
Related service
Content Audits
A content audit inventories every page on your site and grades what to keep, improve, merge, or remove, for established sites whose content has plateaued or declined.
Disclosure: this is a service I sell.