WordPress change post URL: how to do it without losing visitors from Google

Changing a WordPress post URL is safe if the old address leads to the new one with a 301 redirect. For posts, WordPress usually does this itself after you change the slug in the editor. For pages it does not. After the change, check the old address in a private window, fix links in other posts and give Google time.

Author: The TellMyShop team. A guide for WordPress site and WooCommerce store owners: the cause, the manual fix and the same work in a chat conversation.
Last updated: · 6 min read

When is it worth changing a post's address at all?

A post's address is its house number. Links from other sites, readers' bookmarks and Google results lead exactly there. So change it only when you have a good reason.

Good reasons:

  • the address contains a year or a number that is no longer true, for example “5-ways-2021”, and you have refreshed the post,
  • the address is long and contains a whole sentence from the title,
  • the address has a typo or a string of characters left by an import, for example “post-1234-2”,
  • you are merging two posts into one and one address has to go.

Weak reasons are “to get the keyword in the address” on a post that already has traffic, or change for its own sake. A short, readable address helps, but the gain from changing an old post can be smaller than the risk.

Before and after: what a good change looks like

The examples below are illustrative, but they show typical cases.

BeforeAfterWhat changed
/2021/03/12/how-to-protect-roses-over-winter-a-step-by-step-guide-for-beginners//protect-roses-over-winter/a shorter slug and a structure without the date
/5-ways-to-get-rid-of-aphids-2021//get-rid-of-aphids/no year or number that will change
/post-1234-2//pruning-hydrangeas/a readable address instead of an import leftover
/ros%C3%A9-garden-ideas//rose-garden-ideas/no accented characters stored as code

The first row is two changes: the post's slug and the address structure of the whole site. WordPress will usually help with the first, but not the second. More on that below.

The trap: posts get an automatic redirect, pages do not

WordPress remembers the old slug of a published post and redirects it to the new one. This is described in the wp_old_slug_redirect function in the WordPress documentation. However, the mechanism only works for non-hierarchical content, meaning posts. Pages, which can have parent pages, are deliberately left out. A ticket in the WordPress bug tracker to extend this to pages has been open for years (ticket 4328).

In practice:

  • You change the slug of a blog post: WordPress will usually redirect the old address. Check it, but you do not need to add anything.
  • You change the address of the About, Services or Contact page: the old address will return a 404 error. Add a 301 redirect.
  • You change the structure of all addresses in Settings, under Permalinks: the automatic redirect does not cover this. You need a redirect plan for the whole site.
  • Another plugin manages addresses or redirects: the behaviour may differ. After the change, check what responds at the old address.

We describe how to add a redirect when WordPress does not do it in the guide to the 301 redirect in WordPress.

How to change a post's address step by step

  1. Note the old address. Copy it from the browser bar before you change anything.
  2. Change the slug in the editor. In the block editor, click the post title or the URL field in the post panel on the right. Type a short slug in lower case, words separated by hyphens, with no accented characters.
  3. Update the post.
  4. Open the old address in a private window. It should take you to the new one. If you see a 404 error, add a 301 redirect.
  5. Fix internal links. Find posts and pages that link to the old address and change the link to the new one. Check the menu too.
  6. Check the new address in Search Console. URL Inspection shows whether Google can fetch it and lets you request indexing.
  7. Keep the redirect for good. Links from other sites and readers' bookmarks will lead to the old address for a long time yet.

Google explains how it treats 301 redirects and why they are right for a permanent address change in its guide to redirects and Google Search.

What happens to the ranking after the change

In short: with a correct 301 and the same content, Google usually moves the post to the new address, but at its own pace. For a while the old address may still appear in results, and traffic may fluctuate. Without a redirect, the old address drops out of the index as a 404 error, and the links that pointed to it go with it.

So do not combine an address change with a big content rewrite on the same day. If traffic drops after the change, you will know what caused it. When you are refreshing an old post, the guide to refreshing old posts will help you decide whether the address needs touching at all.

How to change the address through the chat without losing the redirect

The TellMyShop plugin for WordPress and WooCommerce lets you make the whole change in one conversation. Your chat (Claude or ChatGPT) changes the address, adds a 301 redirect from the old address, pages included, and proposes fixing the links in other posts. Then it opens both addresses the way Google sees them.

You: Change the address of the post about aphids to a shorter one, without the year. Other posts link to it.

Your chat: Plan of changes for the post “5 ways to get rid of aphids”:

A 301 redirect from the old address to the new one. The new address is free, and no redirect chain is created. 3 posts link to the old address, and I will change the link in them to the new one. Save?

You: Yes.

Your chat: Saved. The old address responds with a 301 and leads to the new one, and the new one returns 200. All changes are in the history, where you can undo them.

Card status: waiting for your “yes”
change preview

old version: /5-ways-to-get-rid-of-aphids-2021/

new version: /get-rid-of-aphids/

Illustration: products, numbers and replies are examples.

The values in this conversation are examples.

In TellMyShop Free the chat checks the old and new address the way Google sees them, shows a list of 404 errors and plans the change, but saves nothing. In TellMyShop Pro the address change, the redirect and the link fixes work right after you activate the licence, with no switches. You see every change in a preview and approve it, and you can undo most changes from the history.

A fair caveat: TellMyShop redirects work as long as the plugin is active. A change to the address structure of the whole site is better planned with the person who looks after it. You will find details on the TellMyShop for WordPress and WooCommerce page, prices on the pricing page and more guides on the blog.

Questions and answers

Will changing a post's address lower its Google ranking?

It may for a while, even with a good redirect, because Google has to learn the new address and move the signals over from the old one. Without a redirect, the old address returns a 404 error and the risk is much higher. Nobody can guarantee the post will return to exactly the same place.

Does WordPress redirect a post's old address by itself?

For posts, usually yes. When you change the slug of a published post, WordPress remembers the old one and redirects it to the new one. For pages, such as About or Services, this mechanism does not work, and you have to add the redirect yourself.

Can a post address contain accented characters?

When WordPress builds an address from the title, it swaps accented letters for plain ones, so “Rosé garden” becomes “rose-garden”. That is the safest option, because an address with accents turns into a string of percent signs in links and messages.

What about links to the old address in other posts?

The redirect keeps them working, but it is better to fix them. Every click then goes through an extra step, and if you ever remove the redirect, the links will break. Change them to the new address in post content and in the menu.

Can I change the structure of all addresses at once?

You can, in Settings, under Permalinks, but that changes the address of every post at the same time, and the automatic redirect does not cover it. On a live site, only do it with a redirect plan, ideally with the person who looks after the site.

WordPress is a trademark of the WordPress Foundation. WooCommerce is a trademark of Automattic Inc. Claude is a trademark of Anthropic PBC. ChatGPT and OpenAI are trademarks of OpenAI. TellMyShop is not affiliated with these companies.

TellMyShop for WordPress and WooCommerce

Your chat reads the site, shows every change before saving it and saves only after your yes. You can undo most changes with one sentence. Works with Claude or ChatGPT, free accounts included.

Read next