← Back to Blog

How to Generate SEO-Friendly Slugs for WordPress Posts

By M Nouman Saeed · Published on September 12, 2026 · 6 min read

WordPress generates a slug for every post automatically the moment you start typing a title. That default is usually fine — but "usually fine" leaves real SEO value on the table compared to a slug you've actually optimized before hitting publish.

💡 Pro-Tip: Generate, Then Paste

Write your post title, paste it into our Free Slug Generator Tool, and paste the clean result into WordPress's permalink field before you publish — overriding the auto-generated default with one that's already been shortened and cleaned.

What WordPress Does by Default

When you type a title like "The Best Way to Clean Text Online in 2026," WordPress's auto-generated slug becomes the-best-way-to-clean-text-online-in-2026— every word lowercased, spaces converted to hyphens, punctuation stripped. It's a reasonable mechanical conversion, but it keeps every stop word ("the," "to," "in") and the full length of your title, which is rarely the ideal slug.

Where to Edit the Slug in WordPress

  • Block Editor:Open the Post settings panel on the right, find "Permalink," and click the URL slug field to edit it directly.
  • Classic Editor:Save the post as a draft first, then look directly under the title field for the "Permalink" row with an "Edit" link.

Common WordPress Slug Mistakes

  • Leaving the full title as the slug: A 60-character title makes for a long, keyword-diluted URL. Trimming it to the 3-5 most important words concentrates the relevant keywords instead of burying them.
  • Keeping stop words:WordPress doesn't remove "a," "the," "and," or "of" automatically — those add length without adding SEO value.
  • Changing a slug after the post is indexed: This breaks existing backlinks and search rankings pointing at the old URL unless you add a 301 redirect. Decide on the slug before publishing, not after.
  • Duplicate or near-duplicate slugs:WordPress will auto-append "-2" to a duplicate slug rather than warn you your two posts might be targeting the same keyword — worth checking manually.

A Better Workflow

Instead of accepting the auto-generated slug or editing it by hand inside WordPress, paste your draft title into a dedicated generator first. Our online slug generator strips punctuation, converts to lowercase, and uses hyphens automatically — matching Google's stated preference for hyphens over underscores — then you manually trim any remaining stop words before pasting the result into WordPress's permalink field. For the full set of slug best practices beyond WordPress specifically, see what a URL slug is and why it matters for SEO.

Frequently Asked Questions

Does WordPress automatically create a good slug from my title?

WordPress auto-generates a slug from your post title by lowercasing it and replacing spaces with hyphens, which is a reasonable starting point. But it doesn't remove stop words, doesn't shorten long titles, and won't catch special characters or duplicate slugs the way a dedicated slug generator does.

Where do I edit a post's slug in WordPress?

In the block editor, it's in the Permalink panel of the right-hand sidebar under Post settings. In Classic Editor, it appears directly under the title field once you've saved a draft, labeled 'Permalink' with an 'Edit' link next to it.

What happens if I change a WordPress slug after publishing?

The URL changes immediately, which breaks any existing backlinks, bookmarks, or search rankings pointing to the old URL unless you set up a 301 redirect. Most SEO plugins (like Yoast or Rank Math) will warn you when you edit the slug of an already-published post for this reason.

Should category or tag names be included in the slug?

That depends on your permalink structure setting, not the individual slug. If your WordPress permalink structure includes '/%category%/', the category is added automatically outside the post slug itself — the slug you edit is still just the final segment.

Publishing a new WordPress post?

Generate a clean, optimized slug before you paste it into the permalink field.

Go to Slug Generator