slugme.ioclean-url-slug-generator

How to Set Up SEO-Friendly Permalinks in WordPress

A step-by-step guide to configuring WordPress permalinks for SEO: the best permalink structure, how to edit slugs, and how to change them safely.

The Slugme.io TeamPublished July 14, 20267 min read
How to Set Up SEO-Friendly Permalinks in WordPress

WordPress powers a huge share of the web, and one of the first SEO decisions every WordPress site makes is its permalink structure — the pattern your URLs follow. Get it right at setup and every post you publish gets a clean, search-friendly URL automatically. Here's how.

In WordPress, a permalink is the permanent URL of a post or page, and the permalink structure is the template that builds it. The post's editable portion is its slug.

https://example.com/blog/url-slug-guide
                          └──── slug ────┘

WordPress lets you choose how the part before the slug is constructed — which is the decision that matters most.

Go to Settings → Permalinks in your WordPress dashboard. You'll see several options:

Option Example Verdict
Plain ?p=123 Avoid — not readable
Day and name /2026/07/14/sample-post/ Avoid — dates age content
Month and name /2026/07/sample-post/ Avoid — same problem
Numeric /archives/123 Avoid — meaningless
Post name /sample-post/ Recommended
Custom /blog/%postname%/ Great for organization

For most sites, choose "Post name" (/%postname%/). It produces the cleanest, most keyword-friendly URLs and avoids putting dates in the slug.

If you want your posts grouped under a folder, use a custom structure like /blog/%postname%/. (See SEO URL structure.)

Pick your permalink structure before you publish a lot of content. Changing it later changes every URL on the site.

Editing a post's slug

By default, WordPress generates a slug from your post title — but its automatic version isn't always optimal. It keeps stop words and can be longer than ideal. To edit it:

  1. Open the post in the editor.
  2. In the Settings sidebar, find the URL or Permalink field (or click "Edit" next to the permalink under the title in the classic editor).
  3. Replace it with a clean, short slug.
Auto-generated:  the-ultimate-guide-to-on-page-seo-in-2026
Better:          on-page-seo-guide

You can generate the ideal slug from your title first, then paste it into the WordPress field.

Best practices for WordPress slugs

  • Shorten the auto-slug. WordPress keeps every word; trim to three to five. (See ideal slug length.)
  • Remove stop words the auto-generator leaves in. (See stop words in URLs.)
  • Set the slug before publishing. Editing it after means you'll need a redirect.
  • Keep it lowercase and hyphenated — WordPress does this by default, so don't fight it.

If you must change a published post's slug, WordPress will not automatically redirect the old URL — so you'll create a 404 unless you act:

  1. Update the slug in the editor.
  2. Add a 301 redirect from the old URL to the new one, using a plugin like Redirection or your SEO plugin's redirect tool. (See how to change a slug without losing SEO.)

Some SEO plugins offer to create the redirect automatically when you change a slug — enable that feature if it's available.

A note on categories and tags

WordPress also creates URLs for category and tag archives (/category/seo/). Keep those slugs clean too, and avoid creating thin tag pages that don't add value. You can customize the category base under Settings → Permalinks.

The takeaway

Set your WordPress permalink structure to "Post name" (or a /blog/%postname%/ custom structure), edit each post's auto-generated slug down to a clean, short version, and always add a 301 redirect if you change a published slug. Do that and every WordPress URL you ship will be SEO-friendly by default.

Generate the perfect slug before you paste it into WordPress — try the generator.

Keep reading