URLs & Slugs

Changing URL Slugs Safely with 301 Redirects

What happens when you change a published URL, how 301 redirects preserve traffic and links, and how to set them up on common platforms.

Changing a slug after a page is published breaks every link pointing to the old address, including bookmarks, social media shares, links from other websites and search results. A 301 redirect fixes that.

What a 301 redirect does

A 301 is a "moved permanently" response. When a browser or search engine requests the old URL, the server sends it to the new one automatically. Search engines transfer ranking signals from the old URL to the new one over time.

When changing a slug is worth it

  • The slug contains a mistake or misleading wording.
  • The content has changed so much that the old URL no longer fits.
  • You are restructuring the site or moving to a new platform.
  • The URL contains a date or number that makes evergreen content look outdated.

If the only reason is a tiny tweak, it is usually better to leave a working URL alone.

How to set up redirects

Apache servers (including many shared hosts such as Hostinger), in the .htaccess file:

Redirect 301 /old-page-slug /new-page-slug

Nginx, in the server configuration:

location = /old-page-slug { return 301 /new-page-slug; }

WordPress: many SEO plugins create redirects automatically when you change a slug, or you can use a redirection plugin.

After the change

  1. Update internal links to point directly to the new URL.
  2. Update your XML sitemap.
  3. Test the old URL in a browser to confirm it redirects.
  4. Avoid redirect chains, where one redirect points to another.

Plan new slugs carefully with a slug generator before publishing, and you will rarely need redirects at all.

Frequently asked questions

How to change a URL without losing SEO?

How to change a URL without losing SEO: publish the new URL, add a 301 redirect from the old one, update internal links and your sitemap, and avoid redirect chains. Google transfers signals to the new URL over time.

How to set up a 301 redirect?

How to set up a 301 redirect on Apache: add a 301 redirect in htaccess, such as "Redirect 301 /old-page /new-page". On Nginx, use a return 301 rule. On WordPress, use an SEO or redirection plugin.

301 vs 302 redirect: which should I use?

In 301 vs 302 redirect choices, use 301 for permanent moves and 302 for temporary ones. For changed slugs and site migrations, use 301.

What is a redirect map?

A redirect map is a spreadsheet listing every old URL and its new URL. It is essential for URL migration and site migration SEO, so no page is forgotten and no link rot sets in.

Try the free Slug Generator

Turn titles into clean, SEO-friendly URL slugs with bulk mode and smart trimming.

Open Slug Generator