WordPress URL Structure: How to Optimize Permalinks

optimize wordpress permalink structure

WordPress permalinks are the permanent web addresses of your posts, pages, and archives. This guide shows beginners how to choose, change, and protect a clean URL structure.

Last updated: · By Ryan Walsh

WordPress permalinks are the permanent web addresses of your posts, pages, categories, and archives. To change them, go to Settings > Permalinks in your dashboard, choose a structure such as Post name, and save. A clean structure is easier for visitors to read and easier for search engines to crawl, but changing an existing URL requires a 301 redirect so old links keep working.

Key Takeaways

  • WordPress uses the Plain setting by default, which produces query-string URLs like ?p=123 instead of readable paths.
  • You change your permalink structure under Settings > Permalinks, and the Post name option produces URLs such as /sample-post/.
  • Google recommends hyphens rather than underscores to separate words in URLs.
  • Google treats URL paths as case sensitive, so /Apple and /apple are two different URLs.
  • Whenever you change a published URL, set up a 301 redirect from the old address to the new one.

A permalink is the full, permanent address of a single piece of content on your site. WordPress applies permalinks to posts, pages, categories, tags, and archive pages, and the official documentation notes that a well-built structure is readable by both people and search engines. In practice, the permalink is the part of the address that appears after your domain name.

Every page on your site needs a stable address so that other sites, social media posts, and search engines can keep pointing to it. That is why changing permalinks later is more involved than choosing them at the start. For a fuller background, read WordPress.org’s documentation on customizing permalinks.

You change your permalink settings from the Permalinks screen in your WordPress dashboard. The change applies site-wide and takes effect as soon as you save. Follow these steps:

  1. Log in to your WordPress dashboard at yourdomain.com/wp-admin.
  2. In the left-hand menu, click Settings, then click Permalinks.
  3. Select the structure you want, such as Post name, or type a custom structure in the Custom Structure field.
  4. Click Save Changes.
  5. Open a few posts and pages to confirm the new URLs load correctly.

The default setting is Plain, which uses query strings instead of readable paths, according to WordPress Learn’s lesson on permalinks and rewriting URLs. Switching away from Plain is usually the first improvement a new site should make.

optimized urls enhance engagement

For most new blogs and business sites, the Post name structure is the best starting point because it produces short, descriptive URLs. The table below compares the built-in options. Example URLs use the same sample post published on March 15, 2026.

Option Example URL Best for
Plain yourdomain.com/?p=123 Avoid; not readable
Day and name yourdomain.com/2026/03/15/sample-post/ Daily news sites that need date context
Month and name yourdomain.com/2026/03/sample-post/ Sites that publish often but do not need exact days
Numeric yourdomain.com/archives/123 Rarely useful; numbers say nothing about the content
Post name yourdomain.com/sample-post/ Most blogs, business sites, and evergreen content
Custom structure Any pattern you define, such as /%category%/%postname%/ Advanced sites with a clear hierarchy

Choose one structure and keep it. Date-based structures can make evergreen articles look outdated, and a category in the path can make a post hard to move later. If you use categories in your URLs, make sure your content is organized first. Our guide to WordPress categories vs tags best practices explains how to structure them.

SEO-friendly permalinks are short, readable, consistent, and built from the words people use to search for your topic. They help visitors understand what a page is about before they click, and they give search engines a clear signal about the content. None of these rules is complicated, but applying them consistently across the whole site matters more than any single URL.

  • Use the Post name structure or another option that leaves out dates and numeric IDs.
  • Keep the slug short, usually three to six descriptive words.
  • Separate words with hyphens, not underscores or spaces.
  • Use lowercase letters throughout your URLs.
  • Use the same format for every post type so your site follows one pattern.

Should You Use Hyphens or Underscores in URLs?

Use hyphens to separate words in your URLs. Google recommends hyphens rather than underscores, so /blue-running-shoes/ is preferred over /blue_running_shoes/. Hyphens also make slugs easier for people to read at a glance.

How Long Should a WordPress URL Be?

A good WordPress URL is short enough to read in one glance and descriptive enough to explain the page. Google advises adding descriptive words to URL paths, and its ecommerce guidance gives a product URL with readable terms as the recommended example over a bare numeric ID. Aim for a slug of three to six meaningful words and remove filler words such as “and” or “the” when they add nothing.

Does Capitalization Matter in URLs?

Yes, capitalization matters in URL paths. Google treats URL paths as case sensitive, so /APPLE and /apple are distinct URLs. Use lowercase slugs consistently, and check that internal links use the same casing as your published addresses.

When you change a permalink, the old address stops working unless you redirect it. Set up a 301 redirect from the old URL to the new one so visitors, search engines, and existing links reach the right page. A 301 redirect tells browsers and search engines that the move is permanent.

Follow this process whenever you change a published URL:

  1. Write down the old URL and the new URL for every affected page.
  2. Create a 301 redirect from each old URL to its new equivalent.
  3. Update internal links on your site so they point to the new addresses directly.
  4. Test several old URLs in a private browser window to confirm they redirect.
  5. Check your analytics and search reports over the following weeks for 404 errors.

change wordpress permalink settings

You can manage redirects with a plugin such as Redirection, which provides a simple interface for old-to-new mappings. If you are new to plugins, our explainer on how WordPress plugins work covers how to install and evaluate them safely. Avoid installing several redirect plugins at once, because overlapping rules can create redirect loops.

The most common permalink mistakes are changing structures after publishing without redirects, keeping long or date-heavy URLs, and mixing formats across the site. Each one creates broken links or confuses visitors. Review this list before you launch a new site or redesign an old one.

  • Changing the permalink structure on a live site without creating redirects for the old URLs.
  • Using long slugs with stacked keywords, which read as spam and are harder to share.
  • Leaving the default Plain structure in place, which hides the meaning of each URL.
  • Changing the domain or moving to HTTPS without updating every URL. Our guide to enabling HTTPS on WordPress with a free SSL certificate covers the steps.
  • Editing slugs repeatedly, which creates a chain of redirects that slows visitors down.

Frequently Asked Questions

For most blogs and business websites, the Post name structure is the best choice. It produces short URLs such as yourdomain.com/sample-post/ that describe the content without dates or numeric IDs. Choose it before you publish many pages, because changing it later requires redirects.

It can, if you change URLs without redirects. Old addresses that return a 404 error lose the link value they have built up. Setting up 301 redirects from every old URL to its new version preserves most of that value and keeps visitors on the right page.

Switch from Plain to Post name in Settings > Permalinks, then edit slugs so they describe the page in a few words. Use hyphens between words and lowercase letters throughout. Avoid numbers, dates, and filler words unless they add meaning.

Should I include categories in my WordPress URLs?

Usually not, unless your site has a clear category hierarchy that will not change. A category in the path makes URLs longer and harder to update when you reorganize content. If a post moves to a new category, its URL changes, and you must redirect the old one.

Usually not. Permalinks depend on your WordPress settings and your domain, not on the server, so they stay the same when you move a site correctly. Confirm after the move that Settings > Permalinks still shows your chosen structure and that key pages load.

Yes, include the main keyword in the slug when it describes the page naturally. Keep it to one or two relevant terms rather than a string of variations. A slug that reads like a sentence a person would type into a search box is a good target.

Conclusion

Permalinks and URLs are a small setting with lasting effects on how visitors and search engines understand your site. Switch from Plain to Post name, keep slugs short and hyphenated, and use one consistent format across the site. When you must change a URL, create a 301 redirect before you move on, so the traffic and links you have earned keep working.

Ryan Walsh

Ryan Walsh

Ryan Walsh is the pen name under which the Start WordPress team writes and edits its guides. The focus is helping beginners build and run a WordPress site: setup, hosting, themes, plugins, security, speed and SEO, with steps checked against official documentation. Read our editorial policy (startwordpress.net/editorial-policy/) and disclaimer (startwordpress.net/disclaimer/).
implement schema in wordpress Previous post How to Add Schema Markup to WordPress Posts
common wordpress seo pitfalls Next post 10 Common SEO Mistakes WordPress Users Make