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.

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.
What are WordPress permalinks?
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.
Choosing the best permalink structure
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:
- Open the post in the editor.
- In the Settings sidebar, find the URL or Permalink field (or click "Edit" next to the permalink under the title in the classic editor).
- 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. Migrating lots of posts? Generate all the new slugs at once with the bulk slug generator. (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.
Changing a permalink safely
WordPress has a built-in safety net for posts: when you change a published post's slug, core saves the old slug (as _wp_old_slug) and redirects visitors to the new URL. Don't rely on it everywhere, though — it does not cover pages, changes to the overall permalink structure, or deleted content.
- Update the slug in the editor.
- Open the old URL in a private window and confirm it redirects (one hop, to the new URL).
- For pages and structure changes, add a 301 redirect with a plugin like Redirection or your SEO plugin's redirect manager. (See how to change a slug without losing SEO.)
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.
Frequently asked questions
Does WordPress redirect old slugs automatically?
For posts, yes: when you change a published post's slug, WordPress stores the old one (_wp_old_slug) and redirects it to the new URL. This does not cover pages, custom changes to the permalink structure or deleted content, so use a redirect plugin for those.
What is the best permalink structure for SEO in WordPress?
Post name (/%postname%/) for most sites, or /blog/%postname%/ if the blog sits alongside other sections. Avoid date-based structures for evergreen content.
Why does WordPress add -2 to my slug?
WordPress requires unique slugs. If a post, page or attachment already uses the slug, it appends -2, -3 and so on. Check the trash and media library for items holding the slug you want.