Quick answer: WordPress permalinks are the URLs of your posts, pages and archives, set under Settings > Permalinks. For most business sites and blogs, the Post name structure (/%postname%/) is the best choice because it is short, readable and does not go out of date. Date based structures suit news sites where the date matters. Avoid the Plain option, which produces URLs like /?p=123. Choose a structure early, keep slugs short and descriptive, and if you ever change the structure on an existing site, plan 301 redirects first so you keep traffic and rankings.
What a permalink is
A permalink is the full, permanent web address of a piece of content. For example:
https://example.com/how-to-choose-a-roofer/
The last part, how-to-choose-a-roofer, is the slug. The pattern used to build URLs for all posts is the permalink structure.
Permalinks matter for three reasons:
- People: a clear URL tells visitors what the page is about before they click, and is easier to share and remember
- Search engines: URLs appear in search results, and descriptive words in a URL help a little with understanding
- Stability: every link to your site, from other sites, emails and social posts, depends on URLs staying the same
The permalink settings
Go to Settings > Permalinks in the dashboard. WordPress offers these common settings:
- Plain:
/?p=123. Not descriptive and best avoided. - Day and name:
/2020/01/25/sample-post/ - Month and name:
/2020/01/sample-post/ - Numeric:
/archives/123 - Post name:
/sample-post/ - Custom Structure: build your own using tags
Custom structures use tags such as:
%postname%: the post slug%category%: the post’s category slug%year%,%monthnum%,%day%: parts of the publish date%post_id%: the post ID number%author%: the author’s username
These settings affect posts. Pages always use their slug, plus any parent page, such as /services/web-design/.
Which structure to choose
Post name: the safe default
/%postname%/ gives short, clean URLs that stay relevant however old the content is. You can move a post between categories without changing its URL. For most business sites, this is the right answer.
Date based: for news and time sensitive content
If your content is genuinely tied to dates, such as news, event reports or release notes, a date in the URL helps readers see how recent it is. The downside is that evergreen guides look out of date in a year or two, even if you update them.
Category based: use with care
/%category%/%postname%/ adds the category, such as /plumbing/fix-a-leaking-tap/. It can make site structure clearer. The risks are:
- Moving a post to a different category changes its URL
- Posts in several categories use only one in the URL, which can confuse
- URLs become longer
If you want to show structure, breadcrumbs often do the job without tying URLs to categories. Our guide to WordPress taxonomies explains how categories and tags should be planned.
Avoid post IDs alone
Numeric URLs tell nobody anything. If you have a very large site with a real risk of duplicate slugs, %postname% combined with something else is better than numbers alone.
Category and tag bases
Under the optional section of the permalinks screen, you can set the category base and tag base. By default, category archives look like /category/news/. You can change the word “category” to something else, such as “topics”.
Removing the category base completely needs a plugin, and it can cause conflicts when a page and a category share the same slug. Unless you have a strong reason, leave the default or choose a clear replacement word.
Writing good slugs
WordPress creates the slug from the title, but you should edit it. In the block editor, find it under the Permalink section of the document settings panel.
Good slugs:
- Are short, often three to five words
- Use the main topic or keyword
- Use hyphens between words, which WordPress does automatically
- Leave out stop words like “a”, “the” and “and” where it still reads clearly
- Avoid dates and numbers that may change, such as “best-tools-2019” or “7-tips”
For example, a post titled “How to Choose the Right Roofer for Your Home” could use /choose-a-roofer/.
Once a post is published and has been shared or indexed, avoid changing its slug. If you must, add a redirect.
How WordPress handles permalinks on the server
Pretty permalinks need URL rewriting on the server. On Apache, WordPress writes rules to the .htaccess file in the site root. If it cannot write the file, the settings page shows the rules for you to add manually.
On Nginx, there is no .htaccess. The server configuration needs a rule that sends requests to index.php, which most WordPress hosts set up already.
If you see 404 errors on every post after changing permalinks or moving hosts, go to Settings > Permalinks and click Save Changes without changing anything. That refreshes the rewrite rules and fixes many cases. Our guide to moving WordPress to a new host covers other migration problems.
Changing permalinks on an existing site
Changing the structure of a live site changes every post URL at once. Done carelessly, it causes broken links, lost rankings and a drop in traffic. If you need to do it:
- Back up the site.
- Export a list of current URLs, for example from your sitemap or an SEO crawler.
- Decide the new structure and map old URLs to new ones.
- Set up 301 redirects. WordPress redirects some changes automatically, such as from old slugs of individual posts, but structure changes need proper rules. The Redirection plugin or server level rules work well.
- Change the setting and save.
- Test a sample of old URLs to confirm they redirect to the right new pages with a 301 status.
- Update internal links in menus and content so they point to the new URLs directly.
- Submit the updated sitemap in Google Search Console and watch for crawl errors.
Treat it like a small site migration. Our SEO migration guide has a fuller checklist.
Permalinks for custom post types and WooCommerce
Custom post types have their own URL base, set when the post type is registered, such as /portfolio/project-name/. WooCommerce adds its own product permalink settings on the same screen, with options for a product base such as /product/ or /shop/. Choose these before launch for the same reasons.
FAQ
What is the best permalink structure for SEO?
For most sites, Post name. It is short, readable and stays relevant. The URL structure is a small ranking factor compared with content and links, but a stable, clean structure avoids problems.
Should I include the year in my URLs?
Only for content that is tied to a date, such as news. For evergreen content, dates make the page look older than it is.
Why do I get 404 errors after changing permalinks?
The rewrite rules may not have been updated. Save the permalinks settings again, and check that your server allows .htaccess rules or has the right Nginx configuration.
Can I change the slug of one post safely?
Yes. WordPress usually redirects the old slug to the new one automatically, but it is still worth adding a redirect manually and updating internal links.
Get the foundation right
Permalinks are one of the first settings to decide and one of the most disruptive to change later. A clean Post name structure with good slugs serves most sites for years. If you want a WordPress site built on a solid structure that turns visitors into enquiries, see our Turn visitors into customers service.