WordPress permalink settings control the web address of every post and page, and you change them under Settings > Permalinks. For most sites the right choice is the Post name structure, and the change takes about two minutes.
I tested every preset on WordPress 7.1.3 in October 2026, on a local Apache 2.4 server running PHP 8.5. I also checked what happens to old URLs after each switch, and the results differ more than most guides admit.
This guide covers the best structure for most sites, the setup steps, custom tags, category and product bases, and the fix for 404 errors. You also get a table that shows what happens to your old links.
What Are WordPress Permalink Settings?
WordPress permalink settings decide how the address of each post, page and archive is built. A permalink is the permanent URL of that content, and you pick its pattern once for the whole site. The pattern uses fixed words and tags such as the post name.
The WordPress documentation describes three types: Plain, Pretty and Almost Pretty. Plain looks like example.com/?p=123, where the number is the post ID in the database. Pretty permalinks use words, such as example.com/sample-post/.
The WordPress documentation says new installs start on Plain, which works on every server but says nothing about the page. A reader cannot guess what ?p=123 holds, and a search engine gets no hint from the address.
Plain addresses also cause a practical problem. Every address is a bare number. You cannot tell two posts apart in a link report without opening each one.
Permalinks also reach beyond posts. Category archives, tag archives, author pages and feeds all build their addresses from the same rewrite rules. A structure change therefore touches more of the site than the post list suggests. To create them, see how to add categories in WordPress.
That is why almost every site moves to a pretty structure early. The WordPress permalink is also the address other sites link to. It is the one setting you do not want to change twice.
Best WordPress Permalink Structure for Most Sites
The best WordPress permalink structure for most sites is Post name, which gives addresses like /sample-post/. It is short and readable, and it carries your main keyword in the address. Google’s URL structure guide recommends readable words over long ID numbers.
For a short address you can print or share, such as /sale/, you can create a vanity URL in WordPress.
The table below shows the five presets plus one common custom pattern, with the address each one builds.

| Structure | Example URL | Best for |
|---|---|---|
| Plain | /?p=123 | Nothing except a site that cannot use rewrites |
| Day and name | /2026/10/08/sample-post/ | Daily news sites |
| Month and name | /2026/10/sample-post/ | Blogs where the date matters |
| Numeric | /archives/123 | Rarely a good fit |
| Post name | /sample-post/ | Most blogs, stores and business sites |
| Category and post name | /news/sample-post/ | Sites with a small and stable set of categories |
Why Post Name Wins for Most Sites
Post name has no dates, no numbers and no folders to outgrow. A guide you update every year keeps the same address. Its links and rankings stay in one place. A date in the URL makes an updated post look old.
This also answers the common search for the best permalink structure for SEO. Google’s guide asks for readable words and few parameters, and Post name does both.
When a Date or Category Structure Fits
A date structure suits a news site where readers expect to see when a story ran. A category structure suits a site with a small, fixed set of topics. Both lock your URLs to something that can change.
If you rename a category, every post address under it changes too. I would pick Post name and show the category on the page instead.
Whatever you choose, write it down. A site with 500 posts is costly to move. The choice you make in year one is the one you will live with in year five.
How to Change WordPress Permalink Settings
You can change WordPress permalink settings in five clicks from the dashboard. Open Settings > Permalinks, pick a structure and save the page. WordPress rewrites its rules at once, and the new addresses work as soon as the screen reloads.
Back up your site first if it is live, because every old address stops matching the moment you save. Make a list of your ten most visited pages so you can test them afterward.
Then follow these steps:
- Log in as an administrator: Only the Administrator role sees the Permalinks screen.
- Open the Permalinks screen: In the left menu, go to Settings > Permalinks.
- Pick a structure: Select Post name. The preview under it shows your real domain with
/sample-post/.
- Save the change: Scroll down and click Save Changes. WordPress shows a green notice that the structure was updated.

- Test three pages: Open a post, a page and a category link in a private window. Each should load at the new address.
Local development makes this safer. If you build sites on your own computer, our guide on setting up WordPress with Local WP gives you a safe test site. Try each structure there first.
Changing the URLs of a large live site is where mistakes cost traffic. Every old link needs a matching redirect. Our WordPress technical SEO services include URL changes with a redirect map. No page loses its rankings.
How to Build a Custom Permalink Structure
You build a custom permalink structure in the Custom Structure field on the same screen. Type the pattern with structure tags, and WordPress fills in each tag for every post. The pattern must end with %postname% or %post_id%. This makes each address point to one post.
On WordPress 7.1.3 the screen offers ten tags. Click a tag button to add it to the field, or type it yourself.

| Tag | What it prints | Example |
|---|---|---|
%year% | Four-digit year of the post | 2026 |
%monthnum% | Month number | 10 |
%day% | Day of the month | 08 |
%hour%, %minute%, %second% | Time of publishing | 15, 43, 33 |
%post_id% | The post ID | 423 |
%postname% | The post slug | sample-post |
%category% | The category slug | news |
%author% | The author name | yash-kapoor |
The WordPress documentation lists the same tags and says to end the structure with %post_id% or %postname%. A pattern such as /%category%/%postname%/ works. So does /%post_id%/%postname%/.
Keep it short. Every extra tag is one more thing that can change later, and a long address is harder to share and to read.
Note: When a post sits in several categories, %category% shows only one of them. The WordPress documentation says the choice is alphabetical. The address may not use the category you expect.
Set the Category Base, Tag Base and Product Permalinks
The Optional section of the Permalinks screen sets the words in front of category and tag archives. The defaults are category and tag. You can change them to words such as topics. You cannot remove those words completely. Plan your addresses around them.
I tested this with a category called Mugs. Leaving the fields blank gave /category/mugs/, which is the safe choice for most sites.

Leave both fields blank unless you have a reason to change them. A new base changes every category and tag address on the site. It needs the same redirect plan as a structure change.
With WooCommerce active, the same screen adds more fields. Product category base, Product tag base and Product attribute base appear below, and a Product permalinks section follows. I saw product-category and product-tag as the defaults on WooCommerce 11.2.
The Product permalinks options are Default (/product/sample-product/), Shop base, Shop base with category, and Custom base. Pick Default unless you have a reason, because shorter product URLs are easier to keep stable. Our WooCommerce SEO guide covers product URLs in more detail.
Permalink vs Slug: What Is the Difference?
A permalink is the full web address of a post. A slug is only the last part that names that one post. The structure you set under Settings > Permalinks adds the rest of the address. The slug comes from the post title unless you edit it.
WordPress builds the slug from the title and removes capitals, spaces and punctuation. A title such as “This Is a Great Post!” becomes this-is-a-great-post. The WordPress documentation describes %postname% as this sanitized title, which is why the slug matters.
You can edit the slug in the post sidebar before you publish. Keep it short, and drop filler words such as “a” and “the” when they add nothing. Use hyphens between words, because Google’s URL structure guide recommends hyphens over underscores.
Pages follow a simpler rule. A page address uses its own slug, and a child page adds its parent as a folder, such as /services/seo/. The post structure you pick does not change page addresses.
Fix the slug before the post goes public. Once a post is live and linked, a new slug acts like a new structure. The old address needs a 301 redirect.
What Happens to Old URLs After You Change Permalinks
After you change WordPress permalink settings, some old URLs redirect to the new ones and some return a 404 error. The result depends on the structure you move to. I tested five switches on a local site, and the redirect outcome changed with the structure.
Here are the results, measured with curl on WordPress 7.1.3 in October 2026:
| Switch | Old URL result |
|---|---|
| Post name to Month and name | /hello-world/ redirects (301) to /2026/10/hello-world/ |
Month and name with the request /?p=1 | Redirects (301) to /2026/10/hello-world/ |
| Post name to Category and name | /hello-world/ returns 404 with no redirect |
| Post name to Plain | /hello-world/ returns 200 but shows the front page instead of the post |
Plain with the request /?p=1 | Loads the post at /?p=1 |
The move to a date structure redirected on its own. So did a /?p=1 request on a site with pretty links. The move to a category structure did not. That is a real risk, because a 404 on an old address drops the page from search results.

Google says to use a permanent server-side redirect whenever you change a URL that shows in search. So on a live site, plan a 301 redirect for every changed address, and test a few of them after you save.
Google also notes that it may keep showing old URLs for a while after a move. The same redirect guide says these alternate names fade away on their own. Do not panic when the old address lingers in results.
How to Check That Your New Permalinks Work
To check that new permalinks work, load a post, a page and a category at the new address and then test one old address. Use a private window so cached pages do not hide a problem. A command line check shows the exact status code.
The curl -I command prints only the response headers, which is the fastest way to see a redirect. Run it against one old address:
curl -I https://example.com/old-post-name/
Look at the first line of the output. A 301 means a permanent redirect, and the Location line shows where it points. A 200 means the page loads at that address, and a 404 means nothing matches it.
Also test the pages that matter most to your income, such as your contact page and your top three posts. Open each one from a link on another page as well as from the address bar. That catches broken internal links.
Open the URL Inspection tool in Google Search Console for one changed address. It shows whether Google can fetch the page and which address Google treats as the main one. Repeat the check on two or three pages a week after the change.
Finally, check your sitemap. Open it in the browser and confirm that every address uses the new structure. If you see old addresses, clear your cache and your SEO plugin cache and then reload.
How to Fix a 404 Error After Changing Permalinks
To fix a 404 error after changing permalinks, go back to Settings > Permalinks and click Save Changes without changing anything. That click makes WordPress rebuild its rewrite rules. On Apache it also rewrites the .htaccess file when the file is missing or out of date.
I proved this on my test site. I deleted .htaccess, and every inner page returned 404 while the home page still loaded. I then clicked Save Changes with no other change, and WordPress created a fresh .htaccess. The pages loaded again.

If the save does not help, work through this list in order:
- File permissions: WordPress must be able to write
.htaccess. If it cannot, the Permalinks screen shows the rules for you to paste into the file by hand. - Apache rewrite module: The server needs
mod_rewriteon andAllowOverride Allfor your site folder. - Nginx servers: Nginx ignores
.htaccess. Your host must add atry_filesrule. Ask your host to confirm it. - A plugin conflict: Deactivate redirect and security plugins one at a time and save again.
- A cache: Purge your page cache and your CDN, because they may serve the old 404.
If your site is on WordPress with a managed host, the host can usually reset these rules in seconds. Send them the exact URL that fails.
Permalink Mistakes to Avoid
The costly permalink mistakes are changing a live structure without redirects, putting dates in the URL by habit and leaving the default Plain setting. Each one is easy to avoid when you decide before you publish. Check the list before you press Save.
- No redirects: Changing structure on a live site without a redirect plan breaks every old link and loses traffic.
- Dates in the URL: A date makes updated content look stale, and it can never change without a new address.
- Changing it twice: Each switch breaks links again. Settle the structure once.
- Long slugs: A post slug with 12 words is hard to read and share. Trim it to the main keyword.
- Forgotten tools: Forms, tracking and reports often depend on page addresses. Test them after the change.
For example, tags in Google Tag Manager on WordPress often fire on a page path, and a new URL can stop them. Run through how to check form submissions in WordPress after any change, because a form tied to an old address may stop recording.
Write the structure and the reason for it into your site notes. When another developer or an agency joins later, they will see that the choice was deliberate.
Conclusion
You now know how to set WordPress permalink settings and which structure to pick. Post name suits most sites, a custom structure needs a stable reason, and Plain should only be a starting point.
Save the structure once and then test a post, a page and a category in a private window. On a live site, add a 301 redirect for every address that changed.
If a 404 appears, click Save Changes on the Permalinks screen first. In my test, that single click rebuilt the missing .htaccess file and fixed every page.
Frequently Asked Questions (FAQs)
Q1. What is the best permalink structure for WordPress?
Post name is the best choice for most sites. It gives short addresses like /sample-post/ with no dates or numbers. Pick a date or category structure only when your content depends on it.
Q2. Where are WordPress permalink settings?
Go to Settings > Permalinks in the WordPress dashboard. You must be an Administrator to see the screen. The page holds the structure presets, the custom field and the category and tag bases.
Q3. Will changing my permalink structure hurt my SEO?
It can, if old URLs return 404 errors. In my test, a move from Post name to Category and name did not redirect the old address. Add 301 redirects before you switch a live site.
Q4. Why do all my pages return 404 after I change permalinks?
The rewrite rules are usually missing or out of date. Open Settings > Permalinks and click Save Changes. In my test, that rebuilt the deleted .htaccess file and restored every page.
Q5. Can I remove the category base from WordPress URLs?
Not with the built-in fields. WordPress keeps category as the default word, and you can only replace it with another word. A plugin or custom redirects can remove it, but that adds risk.
Q6. Can I use different permalink structures for posts and pages?
Pages always use the page slug, with parent pages as folders, such as /services/seo/. The structure you set applies to posts. Custom post types, such as products, have their own base in the same screen.
Q7. Does the permalink structure affect WooCommerce product URLs?
Product URLs follow their own Product permalinks setting instead of the post structure. The default builds /product/sample-product/. Product category and tag bases are separate fields on the same screen.
