Setup & site building · Guide
Which Permalink Structure to Use in WordPress
Short answer
Use the Post name structure, which makes URLs look like yoursite.com/sample-post/. It is short, readable and easy to share, and it stays valid when you update a post. Set it under Settings, then Permalinks, and add 301 redirects for any old addresses that change.
Key takeaways
- Post name is the best permalink structure for most WordPress sites.
- WordPress offers six permalink options, and Plain is the install default.
- Pretty permalinks need the mod_rewrite module on Apache servers.
- End a custom structure with %post_id% or %postname% so each post has its own address.
- Category base and tag base default to category and tag and cannot be removed.
- Changing the structure breaks old URLs unless you add 301 redirects.
What is a permalink in WordPress?
A permalink is the permanent web address of a post, page or archive on your site.
WordPress.org's documentation defines permalinks as the permanent URLs of posts, pages, categories and other archive pages, and notes that these URLs should never be changed.
The word comes from “permanent link”. Once a post is published, its permalink is the address other sites link to, the address you share on social media, and the address search engines use to index the post.
Because links point at that address for years, changing it later breaks bookmarks, shared links and search listings. Choose the structure once, early, and leave it alone.
What permalink structures does WordPress offer?
WordPress offers six options on the Settings, then Permalinks screen.
The WordPress.org documentation lists them as Plain, Day and name, Month and name, Numeric, Post name and Custom Structure.
| Structure | Example URL | What it shows |
|---|---|---|
| Plain | yoursite.com/?p=123 | Post ID only |
| Day and name | yoursite.com/2026/11/21/sample-post/ | Year, month, day and slug |
| Month and name | yoursite.com/2026/11/sample-post/ | Year, month and slug |
| Numeric | yoursite.com/archives/123 | Post ID in an archive path |
| Post name | yoursite.com/sample-post/ | Slug only |
| Custom Structure | yoursite.com/blog/sample-post/ | Tags you choose |
The default setting is Plain, which WordPress sets automatically when you install it. Plain works on every server, but it is not friendly to readers or search engines.
Pretty permalinks are the readable versions, such as /2026/11/21/sample-post/. WordPress.org's documentation calls them SEO-friendly and attractive, because they hold words from the title.
There is also a third type, Almost Pretty permalinks, which start with /index.php/, like yoursite.com/index.php/2026/11/21/sample-post/. They appear on servers that cannot use rewrite rules.
Which permalink structure should you use?
Use Post name for most sites, because it is short, readable and free of dates.
Post name builds URLs from the post slug alone, so an address reads like yoursite.com/sample-post/. Readers can guess the topic from the URL, and the link still works years later.
Date-based structures suit news sites and dated journals, where the publish date is part of the story. For most blogs and business sites, dates in URLs make content look old even when it is still correct.
Google agrees on the shape. Google's URL structure guide recommends readable words rather than long ID numbers in URLs, and simple, descriptive addresses.
Avoid Plain and Numeric unless you have a reason to keep them. They hide the topic, they are hard to read aloud or print, and they give search engines no words to work with.
How do you change your permalink structure?
Change it under Settings, then Permalinks, by picking a radio button and clicking Save Changes.
Log in as an administrator, open Settings, then click Permalinks. Under Common Settings, select the structure you want. WordPress fills in the Custom Structure box to match the option you pick.
Click Save Changes at the bottom of the screen. WordPress updates the URLs for your posts and pages at once, so check the site right after saving.
Your host should have set up the server so pretty permalinks work. WordPress.org's documentation notes that if the server is not set up for them, you need to contact your hosting provider.
On a new site, make this choice before you publish much. On a live site with traffic, plan redirects first, because every changed URL needs one.
How do you build a custom permalink structure?
Build a custom structure from tags such as %postname%, %category% and %year%.
Pick Custom Structure on the Permalinks screen and type a pattern made of structure tags. WordPress.org's documentation lists the tags, including %year% for the four-digit year, %monthnum% for the two-digit month, %day%, %post_id%, %postname%, %category% and %author%.
Always end the pattern with %post_id% or %postname%, so WordPress can point at one single post. A pattern such as /%year%/%monthnum%/%day%/%postname%/ is the dated form, while /%category%/%postname%/ adds the category to the path.
Never type your site address into the custom structure box. The box takes tags only, and WordPress adds the domain itself.
A common custom choice is /blog/%postname%/, which puts all posts under one prefix. That keeps top-level addresses free for pages, and it makes the site structure clear to readers.
What are category base and tag base?
Category base and tag base are the prefixes WordPress puts in front of category and tag archive URLs.
You set them in the Optional section of the Permalinks screen. By default, the category base is “category” and the tag base is “tag”, so a category archive looks like yoursite.com/category/news/.
WordPress.org's documentation says you can change both values, but you cannot remove them from the URLs altogether. If you want shorter archive URLs, a plugin is needed.
When a post has more than one category, only one category shows up in the permalink. WordPress picks it alphabetically, as the WordPress.org documentation explains.
That detail matters if you use %category% in a custom structure. A post filed under both “guides” and “news” will show only one of them, and it may not be the one you expected.
What happens to old URLs when you change permalinks?
Old URLs stop working unless you redirect each one to its new address.
WordPress does not keep the old addresses alive when you change the structure. A link from another site, a bookmark or a search result that points at the old form will land on a 404 page.
Add a 301 redirect for every changed URL. A 301 tells search engines the move is permanent, so most of the old page's standing carries over to the new address.
Our guide to moving a site without losing SEO covers the redirect plan in full.
Our guide to Yoast SEO redirects shows how to add them with a plugin.
After the change, check the site in a search engine. Search for site:yoursite.com and open a few results, to confirm they reach the right pages.
Why do pretty permalinks sometimes return 404 errors?
Pretty permalinks return 404 errors when the server cannot rewrite the address to WordPress.
On Apache servers, pretty permalinks need the mod_rewrite module. The WordPress Codex page on permalinks says pretty permalinks are available on Apache with the mod_rewrite module, and on IIS 7 or later with the URL Rewrite module.
The rules live in the .htaccess file on Apache, or the matching server config on Nginx. If that file is missing, not writable, or the module is off, WordPress cannot map the readable URL to a post.
The first fix is to open Settings > Permalinks and click Save Changes again. Saving flushes the rewrite rules and often clears the error.
If the error stays, check the .htaccess file and ask your host whether mod_rewrite is on. Our guide to fixing broken permalinks walks through the checks in order.
How do you check that your permalinks work?
Check them by opening posts, categories and tags, and by watching for 404 errors.
Open five or six posts from different dates and categories, and click through to a category archive and a tag archive. Each page should load with the address you expect.
Then check the old addresses. If you changed the structure, open an old URL from a search result or a bookmark, and confirm it redirects to the new address.
Watch the case of the letters too. Google's URL structure guide notes that Google treats /APPLE and /apple as distinct URLs, so keep your slugs lowercase and consistent.
Use hyphens, not underscores, between words. Google's guide recommends hyphens, because they signal a word boundary, while underscores are often read as joining words together.
What mistakes should you avoid?
Avoid the five mistakes that cause most permalink trouble.
First, do not change the structure on a live site without a redirect plan. Every changed URL is a broken link until you redirect it.
Second, do not put dates in URLs for content that stays useful for years. A 2021 date on a guide that is still correct will put readers off before they click.
Third, do not use %category% if posts often carry several categories. Only one shows, chosen alphabetically, and it may not match the topic.
Fourth, do not type your domain into the custom structure box. It takes tags only, and a full address there will break the URLs.
Fifth, do not forget to save after choosing. Nothing applies until you click Save Changes, and the rewrite rules are only flushed when you do.
Frequently asked questions
What is the best permalink structure for SEO?
Post name is the best default for most sites, because it is short, readable and has no date to go stale. Date-based structures suit news sites. Plain and Numeric hide the topic and are hard to share, so avoid them unless you have a clear reason.
Will changing my permalink structure break my site?
No, not by itself. WordPress generates the same content at the new address, but links pointing at the old address will break. Add 301 redirects for every changed URL, then check the new addresses in search results and server logs.
Can I change my permalink structure after publishing posts?
Yes. WordPress lets you change the structure at any time under Settings, then Permalinks. On a live site, map the old URLs to the new ones with 301 redirects first, because the change applies to every post and page at once.
How do I change the slug of a single post?
The slug is the last part of the address, taken from the post title. Edit it on the post edit screen, under the title, in the slug field. Keep it short, lowercase and hyphenated, and change it only before the post gains links.
Why do my posts show a 404 error after I change permalinks?
Open Settings, then Permalinks, and click Save Changes again to flush the rewrite rules. If the error stays, check that the .htaccess file exists and is writable, and ask your host whether the mod_rewrite module is on.
What is the difference between category base and tag base?
Category base is the prefix in category archive URLs, and tag base is the prefix in tag archive URLs. Both default to their own names, category and tag, and you can change them in the Optional section of the Permalinks screen.
Sources
- Customize Permalinks WordPress.org
- URL Structure Best Practices for Google Search Google Search Central
- Using Permalinks WordPress Codex
- Apache mod_rewrite Module Apache Software Foundation
Is your product missing, or something out of date?
Tell us what to add or correct. We read every note and reply when we need a source. A message does not buy a ranking.
Thanks — we review requests within 3 business days.
