WordPress

Is a Permalink in WordPress a Key to Better SEO?

Clean WordPress permalinks help readers, but Google says URL keywords barely matter. The real risk is changing structure without 301 redirects.

Shashank Dubey
·12 min read
A WordPress URL split into domain, date structure and slug, with 301 keeps signals and 404 loses them labels

Yes, but not in the way most SEO checklists claim. A clean WordPress permalink helps people and Google understand a page, and parts of it can show as breadcrumbs in search results, yet Google states that keywords in a URL path “alone have hardly any effect beyond appearing in breadcrumbs.” The bigger SEO risk is not the structure you pick but changing it later without redirects, because every old URL that turns into a 404 loses the links and signals it earned.

Our team rewrote this guide on 18 November 2026. We re-read Google Search Central’s URL structure, SEO Starter Guide and redirect pages, read the permalink and redirect code in WordPress 7.1.4, and then changed permalink structures on a test site to record which old URLs WordPress redirects by itself and which ones break. The results are below, including two cases where WordPress does not save you.

What is a permalink in WordPress?

A permalink is the permanent URL of a single post, page, category or other archive on your site. WordPress builds it from a pattern you choose under Settings, then Permalinks, plus the slug of each piece of content. The WordPress.org permalink documentation describes three kinds:

  • Plain, such as example.com/?p=123, where 123 is the post ID in the database. It works on every server but tells a reader nothing.
  • Pretty, such as example.com/sample-post/ or example.com/2026/11/18/sample-post/. These need URL rewriting on the server (mod_rewrite on Apache, a try_files rule on nginx).
  • Almost pretty, such as example.com/index.php/sample-post/, for servers that cannot rewrite URLs but support PATH_INFO.

The slug is the last part, for example sample-post. WordPress creates it from the title when you first save, and you can edit it in the post sidebar. The structure is the pattern around it, built from structure tags.

One detail the documentation glosses over: a fresh install does not always start on Plain. During installation, WordPress 7.1.4 tries the Day and name structure (/%year%/%monthnum%/%day%/%postname%/), checks whether a test request works, falls back to the index.php version, and only then settles on Plain. That is why so many older sites carry dates in their URLs: nobody chose them, the installer did.

Which permalink structures does WordPress offer?

The Permalinks screen in WordPress 7.1.4 lists five presets and a Custom structure field. Here is what each produces for a post called “Sample Post” published on 18 November 2026:

Setting

Example URL

Good for

Watch out for

Plain

/?p=123

Servers with no rewriting at all

Says nothing about the page; Google recommends readable words over IDs

Day and name

/2026/11/18/sample-post/

News sites where the date is part of the story

Long URLs; evergreen posts look dated

Month and name

/2026/11/sample-post/

Frequent publishers who want some date context

Same dating problem, slightly shorter

Numeric

/archives/123

Almost nobody today

Opaque, like Plain

Post name

/sample-post/

Blogs, business sites, how-to sites

Slugs must be unique across posts and pages

Custom

for example /%category%/%postname%/

Sites with a stable, meaningful category tree

URL changes whenever the category changes

Custom structures are built from structure tags. Core WordPress 7.1.4 recognises these in a post permalink: %year%, %monthnum%, %day%, %hour%, %minute%, %second%, %post_id%, %postname%, %category% and %author%. The documentation asks you to end the structure with %postname% or %post_id% so each URL points at exactly one post.

If you use %category% and a post sits in several categories, only one appears in the URL. The WordPress.org article says the choice is alphabetical, but the code in 7.1.4 sorts the post’s categories by term ID and takes the lowest one (and the Permalinks screen’s own help tab says “the lowest numbered category”). Developers can override that choice with the post_link_category filter.

Do permalinks affect SEO, according to Google?

Google has written down its position in two places, and both are worth reading in full. Here is what they say, checked on 18 November 2026.

The URL structure guidelines in Google Search Central (last updated 21 October 2026) recommend:

  • Using “readable words rather than long ID numbers” in URLs.
  • Separating words with hyphens instead of underscores.
  • Using words in your audience’s language, with non-ASCII characters percent-encoded in links.
  • Avoiding session IDs in URLs and parameters that do not change the content.
  • Not relying on URL fragments (the part after #) to change content, because Google generally does not support them.
  • Keeping case consistent, because Google treats /APPLE and /apple as different URLs.

The SEO Starter Guide (last updated 10 December 2025) adds the honest part. It recommends descriptive URLs because “parts of the URL can be displayed in search results as breadcrumbs”, so searchers use the URL to judge whether a result is useful. It then says that from a ranking perspective, keywords in a domain name or URL path “alone have hardly any effect beyond appearing in breadcrumbs.”

Put together, the realistic SEO value of a good permalink is this:

  • Readability and trust. A URL like /fix-wordpress-404-after-migration/ tells a searcher and anyone you share it with what they will get.
  • Breadcrumb display. Google may show URL segments as a breadcrumb trail under your title.
  • Stability. A structure without dates or categories rarely needs to change, so links pointing at it keep working for years.
  • No ranking boost from stuffing keywords. Writing /best-wordpress-seo-tips-seo-guide/ will not lift you above a page with a better answer.

So the answer to the title question is: permalinks are a hygiene factor. Get them readable once, keep them stable, and spend your effort on the content.

Which permalink structure is best for SEO?

For most new WordPress sites, Post name (/%postname%/) is the sensible default. It is short, readable, never goes stale and does not change when you reorganise categories. Our team uses it on tweakswp.com.

There are good reasons to pick something else:

  • News and press sites may want dates in the URL, because the date is part of the meaning and readers expect it. Month and name keeps it shorter.
  • Large sites with many sections can benefit from a directory per section. Google’s Starter Guide says grouping similar topics into directories helps Google learn how often each part of a site changes, mainly once a site has more than a few thousand URLs.
  • Sites that need unique URLs regardless of title, such as a support knowledge base that reuses titles, can end with %post_id%.

Whatever you pick, decide early. The cheapest permalink change is the one you make before Google has crawled anything.

What makes a good slug?

The structure is set once, but you write a slug for every post. These rules come straight from Google’s guidance and from what we see go wrong:

  • Use the words a reader would recognise, separated by hyphens. WordPress converts spaces to hyphens for you.
  • Keep it short. Drop filler words (“a”, “the”, “how to” when the rest is clear) only if the slug still reads naturally.
  • Leave years out of slugs for content you plan to update. /best-backup-plugins/ can be refreshed every year; /best-backup-plugins-2024/ cannot without a URL change.
  • Avoid accented or non-Latin characters only if your audience does not use them. Google is fine with them in your audience’s language.
  • Decide before publishing. Editing a slug later is safe for posts (see below) but not for pages.

What happens when you change permalinks in WordPress?

This is where real traffic gets lost. WordPress has two built-in safety nets, and both have gaps. We tested them on a WordPress 7.1.4 site with a post published on 30 September 2024 and a page, checked on 18 November 2026.

Safety net 1: old slug redirects for posts

When you change the slug of a published post, WordPress stores the previous slug in a hidden custom field called _wp_old_slug. Later, when someone requests the old URL and gets a 404, the function wp_old_slug_redirect() looks up that field and sends a 301 redirect to the current URL. In our test, renaming permalink-test-post to permalink-renamed left the old URL answering with a 301 to the new one.

The gap: the function skips hierarchical post types, so pages are not covered. We renamed a page from about-us-old to about-team; the old URL returned 404 and no _wp_old_slug value was stored. The same applies to any slug changed directly in the database or by an import, because the old value is only recorded when WordPress itself saves the change.

Safety net 2: guessing a redirect for 404s

The second net is redirect_guess_404_permalink(). When a request ends in a 404 but WordPress parsed a post name from it, core searches for a published post whose slug starts with that name and redirects there. It has been in core for a long time, and WordPress 5.5 added filters to control it (function reference).

This is why some structure changes seem to “just work”. On our test site:

Change we made

Old URL requested

Result in WordPress 7.1.4

Post name, then switched to Day and name

/permalink-test-post/

301 to the new dated URL

Day and name, then switched to Post name

/2024/09/30/permalink-test-post/

404

Day and name, then switched to Category and name

/2024/09/30/permalink-test-post/

301 to /uncategorized/permalink-test-post/

Post name, then switched to Category and name

/permalink-test-post/

404

Post slug renamed

/permalink-test-post/

301 to the new slug

Page slug renamed

/about-us-old/

404

The most common real-world move, cleaning up dated URLs by switching from Day and name to Post name, is exactly the one that breaks. Under the new structure, WordPress reads /2024/09/30/permalink-test-post/ as a request for a page path, not a post name, so neither safety net fires. Fred Meyer found the same pattern on WordPress in 2017 in a test published on WPShout, and our 7.1.4 test shows it has not changed.

The guessing net also has a downside: it matches by prefix. A mistyped or truncated URL such as /permalink-ren/ redirected to /permalink-renamed/ on our site. That is usually helpful, but it can send visitors to the wrong post when several slugs share a beginning. Developers can limit it to exact matches with the strict_redirect_guess_404_permalink filter, or turn it off with do_redirect_guess_404_permalink.

How do you change permalinks without losing SEO?

If the current structure is genuinely hurting you (Plain URLs, or dates on evergreen content), changing it can be worth it. Google says how: use permanent server-side redirects. Its redirects documentation recommends a 301 or 308 “whenever possible” when you change a URL shown in search results, and its site move guide says to keep redirects “for as long as possible, generally at least 1 year”, avoid redirect chains, and not send many old URLs to one irrelevant page such as the home page, which may be treated as a soft 404.

Here is the order our team follows.

1. Take a backup and export every current URL

Make a full backup first. Then save a list of every public URL before you touch the setting. With WP-CLI, one command per content type does it (checked on 18 November 2026 with WP-CLI 2.12.0):

wp post list --post_type=post --post_status=publish --field=url > old-post-urls.txt
wp post list --post_type=page --post_status=publish --field=url > old-page-urls.txt

Your XML sitemap (WordPress serves one at /wp-sitemap.xml unless an SEO plugin replaces it) is a second source. Search Console’s Performance report gives you the URLs that actually get impressions, which are the ones you must not lose.

2. Change the structure, then flush rewrite rules

Change the setting under Settings, then Permalinks, and click Save Changes. Saving that screen also flushes the rewrite rules, which is the first thing to try whenever pretty URLs return 404. On Apache, WordPress writes these lines to .htaccess if the file is writable (this is the exact output of WordPress 7.1.4):

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress

On nginx, .htaccess is ignored. The server block needs the rule from the WordPress nginx guide instead:

location / {
    try_files $uri $uri/ /index.php?$args;
}

We cover the rest of the Apache file, including caching and security rules, in our .htaccess optimisation guide.

3. Add pattern redirects for the old structure

When the old and new URLs follow a pattern, one rule covers every post. This example sends Day and name URLs to Post name URLs. We tested the pattern against sample paths on 18 November 2026: it rewrites /2024/09/30/my-post/ to /my-post/ and leaves day archives such as /2024/09/30/ and paged archives alone.

For Apache, place this above the # BEGIN WordPress block, replacing the domain:

RedirectMatch 301 ^/[0-9]{4}/[0-9]{2}/[0-9]{2}/([^/]+)/?$ https://example.com/$1/

For nginx, inside the server block:

rewrite ^/[0-9]{4}/[0-9]{2}/[0-9]{2}/([^/]+)/?$ /$1/ permanent;

No server access? The free Redirection plugin (version 5.10.1, over 2 million active installs, tested up to WordPress 7.1.4 when we checked) supports regular expression redirects from inside wp-admin. It runs in PHP, so it is a little slower than a server rule, but it is fine for most sites.

4. Fix internal links and test the old URLs

Redirects protect visitors arriving from Google and other sites, but your own posts should link to the new URLs directly so nobody goes through an extra hop. A search and replace on the database handles that; our WP-CLI search-replace guide shows how to run it with a dry run first.

Then test every old URL you exported in step 1. This loop prints the status code and final destination for each one:

while read -r url; do
  curl -s -o /dev/null -w "%{http_code} %{redirect_url} $url\n" "$url"
done < old-post-urls.txt

Every line should start with 301 and point at the correct new URL. A 404 means a missing rule; a 302 means something is redirecting temporarily, which you should change to permanent.

5. Watch Search Console for a few weeks

In Search Console, the Pages report will show old URLs moving to “Page with redirect” over the following weeks, which is expected. Watch the “Not found (404)” list for URLs your rules missed, and inspect a few important new URLs with the URL Inspection tool. Keep the redirect rules in place for at least a year, as Google asks, and in practice leave them forever: they cost almost nothing.

Should you change permalinks on an established site?

Only when the gain is clear. A structure change rewrites every URL at once, and even with perfect 301s, Google has to recrawl each one and move its signals to the new address. That takes time, and rankings can wobble while it happens.

Our rule of thumb:

Current situation

Our recommendation

Plain permalinks (?p=123)

Change to Post name, with a full redirect plan. WordPress handles ?p= requests by redirecting them to the pretty URL, but test it.

Day and name on evergreen content, site is new or small

Change, using the pattern redirect above.

Day and name on a large, well-ranked site

Usually leave it. The dates cost you little; a botched migration costs a lot.

Category and name, categories keep changing

Consider switching to Post name, because every category edit already changes URLs.

Post name already

Leave it. Improve slugs only on new posts.

Category and tag archive URLs are a separate setting. The Category base and Tag base fields on the same screen change /category/news/ to, for example, /topics/news/. Changing them breaks every archive URL the same way, so treat it as a migration too. If you have deleted or renamed categories, our guide to restoring a WordPress category explains how to bring back its archive URL, and our guide to WordPress archive pages shows where those URLs come from.

Common mistakes people report

These are the permalink problems that come up again and again in the WordPress support forums and the core bug tracker. We read each source on 18 November 2026.

  • Switching from Plain to Post name and getting 404 on every post. On a shared host, the site owner found there was no .htaccess file in the WordPress root at all; adding one with the standard WordPress rules fixed every URL. (WordPress.org forum, 2016)
  • Editing .htaccess on a server that runs nginx. A site on a Synology NAS returned 404 for every page and broke the REST API after switching to Post name, because the web server was nginx and ignored .htaccess. A try_files rule in the nginx configuration fixed it. (WordPress.org forum, January 2025)
  • Assuming WordPress redirects every old URL after a structure change. A hands-on test found that switching to Post name from any structure except Plain did not forward old URLs, which matches our 7.1.4 test above. (WPShout, February 2017)
  • Renaming pages and expecting the old slug redirect to cover them. Trac ticket 4328, opened in 2007, asks for old-slug redirects to work for pages and for old permalink structures. A 2019 comment found some page changes redirect and others still return 404; on our test, a renamed page returned 404. (WordPress Trac ticket 4328, April 2019)
  • Being surprised when a broken URL lands on the wrong post. A report in the core tracker describes WordPress’s URL autocorrect redirecting to an unrelated post because of a word added after the permalink. That is the prefix guessing described above, and the 5.5 filters exist to tame it. (WordPress Trac ticket 50222, May 2020)

Frequently asked questions

Is the Post name permalink always the best choice?

For most blogs and business sites, yes, because it is short, readable and never goes out of date. News sites and very large sites have good reasons to add dates or section directories.

Do keywords in the URL help rankings?

Very little. Google says keywords in a URL path alone have hardly any effect beyond appearing in breadcrumbs. Readable URLs still help people choose your result.

Should I use hyphens or underscores in slugs?

Hyphens. Google recommends them as word separators, and WordPress uses them by default.

Will changing a post’s slug hurt SEO?

Briefly, if at all, for posts: WordPress stores the old slug and 301 redirects it. For pages, add a redirect yourself, because core does not store old page slugs.

How long should I keep redirects after changing permalinks?

Google says as long as possible, generally at least one year. We keep them permanently, since a few rewrite rules cost nothing.

Why do I get 404 errors right after changing permalinks?

Usually the server is not rewriting URLs: a missing or unwritable .htaccess on Apache, mod_rewrite disabled, or no try_files rule on nginx. Saving the Permalinks screen again flushes WordPress’s own rules and is the first thing to try.

Can I remove the date from existing WordPress URLs safely?

Yes, if you add a pattern redirect from the dated URLs to the new ones and test every old URL. WordPress will not redirect them for you in that direction.

Part of the Wbcom Designs family

The all-in-one WordPress community stack

Also ours: wbcomdesigns.comvapvarun.combrndle.com