Every page and post on a WordPress site has a permanent address, called a permalink. It is the URL people bookmark, share on social media and click from search results. Because these addresses are meant to last for years, the structure you choose early on matters more than most new site owners realize.
This guide covers what WordPress permalinks are, the options WordPress gives you, which structure works best for most sites, and how to change your settings without leaving a trail of broken links behind.
What is a permalink?
A permalink is the full URL of a single piece of content. For example:
https://example.com/?p=123https://example.com/2026/03/14/sample-post/https://example.com/sample-post/
All three could point to the same post. The difference is how readable and stable they are. The first tells a visitor nothing. The last one tells both people and search engines exactly what the page is about.
The part at the end, sample-post, is called the slug. WordPress generates it from your title, but you can edit it in the post editor's settings panel.
The permalink options in WordPress
Go to Settings → Permalinks in your dashboard. You will see these common structures:
- Plain:
/?p=123. The default on some older installs. Works everywhere but is unhelpful for readers and search. - Day and name:
/2026/03/14/sample-post/. - Month and name:
/2026/03/sample-post/. - Numeric:
/archives/123. - Post name:
/sample-post/. - Custom structure: build your own using tags like
%category%,%postname%,%year%and%post_id%.
There is also an "Optional" section for changing the category and tag base, so /category/news/ could become /topics/news/.
Which permalink structure is best?
For most websites, Post name is the best choice. It produces short, readable URLs that contain your keywords and do not go stale.
Here is why the other options usually lose:
Dates age your content
A URL like /2019/05/best-running-shoes/ tells readers the article is old, even if you updated it last week. That can lower click-through from search results. Date-based structures make sense mainly for news sites where the publication date is the point.
Categories make URLs fragile
A structure like /%category%/%postname%/ looks organized, but if you ever move a post to a different category, its URL changes. Unless you set up a redirect, every old link breaks. It also makes URLs longer.
Numbers mean nothing
Numeric or plain URLs carry no information. People are less likely to click a link they cannot read.
When a custom structure makes sense
Larger sites sometimes want a prefix to separate content types, such as /blog/%postname%/ so that blog posts live under a clear section while pages stay at the root. That is a perfectly good choice. Just decide on it before you publish lots of content.
Writing good slugs
The structure is only half the story. The slug itself should be:
- Short: three to six words is usually plenty.
- Descriptive: use the main phrase people would search for.
- Lowercase with hyphens: WordPress does this automatically.
- Free of filler words: "how-to-fix-a-leaky-faucet" can become "fix-leaky-faucet".
Avoid putting a year in the slug unless the content is truly tied to that year. An article slugged best-laptops-2024 has to be renamed (and redirected) every time you refresh it.
How to change permalinks safely
Changing permalinks on a new site with no traffic is simple: pick a structure and click Save Changes. On an established site, it needs a little more care.
Step 1: Take a backup
Back up your files and database first. Permalink changes are reversible, but redirect plugins and .htaccess edits are easier to undo with a fresh backup on hand.
Step 2: Record your current URLs
Export a list of your existing URLs. Your XML sitemap (often at /wp-sitemap.xml or the sitemap from your SEO plugin) is a quick way to see them all.
Step 3: Change the setting
Pick the new structure in Settings → Permalinks and save. WordPress updates the rewrite rules immediately.
Step 4: Redirect old URLs
WordPress will try to guess where an old URL should go, and it handles some cases (like moving from date-based URLs to post name) reasonably well. Do not rely on guessing for an important site. Use a redirect plugin or server rules to send each old URL to its new home with a 301 (permanent) redirect. This passes visitors and search engines along to the right page.
For a pattern change, a single rule can often cover everything. For example, moving from /2026/03/sample-post/ to /sample-post/ can be handled with one regular-expression redirect in most redirect plugins.
Step 5: Test and update
- Click through several old URLs and confirm they land on the right page.
- Update internal links in menus and important pages so they point directly to new URLs.
- Resubmit your sitemap in Google Search Console.
Troubleshooting permalink problems
Every page except the homepage shows a 404
This usually means the rewrite rules are missing. Go to Settings → Permalinks and click Save Changes without changing anything. That regenerates the rules. If it still fails, your .htaccess file may be missing or not writable. We cover that in more detail in our guide to fixing WordPress 404 errors.
The Permalinks page says it cannot write .htaccess
WordPress will show you the rules to paste in manually. Open .htaccess in your site's root folder using your hosting file manager and add them.
Slugs end in -2
If WordPress adds -2 to a slug, another post, page or media attachment already uses that slug. Check the trash and the media library, since an image named sample-post.jpg can claim the slug first.
Wrap-up
Choose Post name (or a simple custom structure like /blog/%postname%/), keep slugs short and descriptive, and avoid dates unless you run a news site. If you have to change permalinks on a live site, back up first, set up 301 redirects, and test old links. A few minutes of planning here saves years of broken links and lost search traffic.