Quick answer: Permalinks are the permanent URLs of your posts and pages. For almost every site, go to Settings → Permalinks and choose Post name (yoursite.com/sample-post/) — it’s short, readable and good for SEO. Set it on day one. If your site is already established, changing permalinks needs 301 redirects from old URLs to new ones, or you’ll lose traffic and create broken links.
Permalink options in WordPress
| Option | Example | Recommended? |
|---|---|---|
| Plain | yoursite.com/?p=123 | No — not readable |
| Day and name | yoursite.com/2026/10/22/sample-post/ | Only for news sites |
| Month and name | yoursite.com/2026/10/sample-post/ | Only for news sites |
| Numeric | yoursite.com/archives/123 | No |
| Post name | yoursite.com/sample-post/ | Yes — best for most sites |
| Custom structure | yoursite.com/%category%/%postname%/ | Sometimes |
Why “Post name” is best for most sites
- Readable: people can see what the page is about before clicking.
- Short: easy to share and remember.
- Evergreen: no dates, so updated content doesn’t look old.
- Flexible: you can change categories later without changing URLs.
Should you include the category?
A structure like /%category%/%postname%/ can work for large sites with clearly separated sections, but it makes URLs longer, and if you ever move a post to another category its URL changes. For most blogs and business sites, plain Post name is simpler and safer.
How to change your permalink setting
- Go to Settings → Permalinks.
- Select Post name.
- Click Save Changes.
- Visit a few posts to check they load. If you see 404 errors, save the permalinks page again — this refreshes the rewrite rules.
Writing good slugs
The slug is the last part of the URL, e.g. how-to-install-wordpress. WordPress creates it from your title, but you can edit it in the post settings sidebar.
- Use the main keyword:
/wordpress-login/not/how-i-finally-managed-to-log-in-to-my-site/. - Keep it short — three to five words.
- Use hyphens, lowercase letters and no special characters.
- Remove filler words like “a”, “the”, “and” when they add nothing.
- Don’t include the year unless the content is truly yearly — otherwise you’ll want to change the URL later.
Changing permalinks on an established site
If your site already has traffic and backlinks, changing URLs is risky. Every old URL must redirect to its new address with a 301 (permanent) redirect:
- Back up your site.
- Export a list of current URLs (your sitemap is a good source).
- Change the permalink setting or slug.
- Add 301 redirects from old to new URLs (a redirect plugin or your SEO plugin’s redirect manager can do this; when you switch from a date-based structure to Post name, WordPress often redirects automatically, but check).
- Test old URLs to confirm they redirect.
- Resubmit your sitemap in Google Search Console and watch for 404 errors.
Fixing permalink 404 errors
| Problem | Fix |
|---|---|
| All posts show 404 after changing permalinks | Save the Permalinks settings again |
| Still 404 on Apache servers | Check the .htaccess file is writable and contains WordPress rewrite rules |
| 404 on Nginx servers | Ask your host to add WordPress rewrite rules |
| One page 404 | Check its slug and whether another post uses the same one |
Most hosts handle rewrite rules automatically. For technical details, see the official Using Permalinks documentation.
Category and tag base
On the same settings screen you can change the category base and tag base — the words that appear in archive URLs, such as yoursite.com/category/hosting/. You can rename them (for example to topics), but leave them alone on an existing site unless you set up redirects. Some SEO plugins can remove the category base entirely; it’s a matter of taste, not a ranking factor.
Page URLs and parent pages
Pages use their slug too. If a page has a parent page, the URL includes the parent: yoursite.com/services/web-design/. That’s useful for organising service pages, but keep the hierarchy shallow — one level is usually enough.
Permalinks and SEO: what really matters
A clean URL helps users and is a small SEO signal, but it won’t rank a page on its own. What matters more is that URLs stay the same — every change risks losing link value. Choose a good structure early, then focus on content. For more SEO setup, see our SEO plugin guide.
Frequently asked questions
What is the best permalink structure for SEO?
Post name (/%postname%/) for most sites.
Should I put dates in my URLs?
Only for news sites where dates matter. Otherwise they make content look outdated.
Can I change a post’s slug after publishing?
Yes, but add a 301 redirect from the old URL if it already has traffic or links.
What does “slug” mean?
The URL-friendly name of a post or page, such as wordpress-permalinks.
Final thoughts
Set permalinks to Post name before you publish, keep slugs short and keyword-focused, and never change URLs without redirects. It takes one minute and saves many headaches later.
A real-world example
A food blogger had used the default “Plain” permalink setting for two years, so every post URL looked like yoursite.com/?p=123. She switched to “Post name” for cleaner URLs. Because WordPress automatically redirects old ?p= links to the new pretty URLs, her existing links and rankings were safe. A year later, a different blogger changed from /year/month/post-name/ to /post-name/ without checking redirects — and some older links broke because a caching plugin was serving stale pages. After clearing the cache and adding redirects for a few problem URLs with a redirect plugin, everything recovered. The lesson: changing permalinks is safe when you check redirects carefully, and risky when you don’t.
Best practices for writing slugs
- Keep slugs short: three to five words is usually enough.
- Use the main topic, not the full title — “best-free-wordpress-themes” rather than “the-15-best-free-wordpress-themes-for-2026”.
- Avoid dates and numbers that will go out of date.
- Use hyphens between words, not underscores.
- Don’t change slugs of published posts unless you add a redirect.
Permalinks and security
Permalinks themselves don’t affect security, but the .htaccess file that controls them on Apache servers is a common target for attackers, who add hidden redirect rules. If your site starts redirecting visitors to spam — something many site owners checked for after the October 2026 PHP2Shell vulnerabilities — inspect .htaccess for rules you didn’t add. Resaving permalinks regenerates WordPress’s own rules, but you should remove any suspicious code manually.
Category bases and custom structures
WordPress adds “/category/” and “/tag/” to archive URLs by default. Some SEO plugins can remove these bases for shorter URLs, but it isn’t necessary for rankings, and it can cause conflicts if a page and a category share the same name. For most sites, leaving the default bases in place is the safest option. If you run a large site with many sections, you might use a custom structure such as /%category%/%postname%/, but remember that moving a post to a different category would then change its URL. Simple “Post name” URLs avoid that problem and work well for nearly every site.
Checking your permalinks after changes
After changing permalink settings, visit a few posts, pages and category archives to confirm they load. Test a couple of old URLs to make sure they redirect. Then check Google Search Console over the next few weeks for any new 404 errors and add redirects where needed.
WordPressPrime.com is an independent guide and is not affiliated with the WordPress Foundation, WordPress.org or Automattic. Always back up your website before making changes, and check official sources for the latest details.
