Changed a URL and Now Google Shows 404? How to Set Up Redirects in WordPress (SEO-Safe)
2 free files — jump to downloads
On this page
- Why changing URLs breaks things
- Step 1: Find the broken URLs
- Step 2: Decide what each old URL should do
- Step 3: Add the redirects in WordPress
- With a plugin (easiest)
- With .htaccess (Apache and LiteSpeed hosts)
- Changing your whole permalink structure
- Step 4: Test every redirect
- Step 5: Update your own links and tell Google
- Redirect mistakes that cost rankings
- Planning a redesign?
- Download the files
You tidied up a post's URL, renamed a category, deleted an old page or rebuilt your site with a new structure. A few days later, Google Search Console reports "Not found (404)" errors, visitors from old links land on an error page, and a page that used to rank has vanished. The fix is a 301 redirect: a permanent forwarding address from the old URL to the new one.
This guide shows how to find broken URLs, choose the right redirect, set it up in WordPress and protect your rankings.
Why changing URLs breaks things
Every URL is an address that Google, other websites, social posts, emails and bookmarks point to. When you change it, all of those still point to the old address. Without a redirect, they hit a 404 error, visitors leave, and the ranking signals the old page earned are lost.
Step 1: Find the broken URLs
- Google Search Console: open Indexing > Pages and look for Not found (404). Click it to see the URLs.
- Your own 404 log: the free SWS Site Fixer plugin (download below) has a Redirects & 404 tab. Turn on Log 404 errors and it records every broken URL visitors hit, with a hit counter, so you fix the ones that matter first.
- Your old sitemap or a crawl: if you are planning a redesign, list all current URLs before you change anything. The redirect map spreadsheet below is built for this.
Step 2: Decide what each old URL should do
- The page moved: 301 redirect to the new URL.
- The page was merged into another: 301 redirect to the page that now covers that topic.
- The page was deleted with no replacement: let it return 404 (or 410 "gone"). Do not send it to the homepage.
- The move is temporary (a seasonal page, a short maintenance swap): use a 302 redirect.
Step 3: Add the redirects in WordPress
With a plugin (easiest)
In SWS Site Fixer, open Redirects & 404, turn on Enable redirects, then add the old path and the new URL. From the 404 log you can click Redirect this next to a broken URL to create the redirect in one step. Any reputable redirect plugin works similarly.
With .htaccess (Apache and LiteSpeed hosts)
For a few permanent redirects you can add lines to .htaccess, above the WordPress block. Back up the file first:
Redirect 301 /old-page/ https://yourdomain.com/new-page/ Redirect 301 /blog/old-post-slug/ https://yourdomain.com/blog/new-post-slug/
A typo in .htaccess can take the whole site down, so a plugin is safer for most people.
Changing your whole permalink structure
If you change Settings > Permalinks (for example from dated URLs to "Post name"), every post URL changes at once. A single pattern-based redirect rule can handle it; ask your developer or use a redirect plugin that supports regular expressions, and test thoroughly.
Step 4: Test every redirect
- Type each old URL into a private browser window and confirm it lands on the right page.
- Check the redirect is a 301, not a 302, with a free redirect checker or your browser's developer tools (Network tab).
- Make sure there are no chains (A to B to C). Point old URLs straight at the final destination.
- Make sure nothing loops back on itself. A loop causes "too many redirects"; see how to fix redirect loops.
Step 5: Update your own links and tell Google
- Update internal links in menus, posts and buttons to point directly to the new URLs.
- Submit your updated sitemap in Search Console.
- Use URL Inspection on a few important new URLs and request indexing.
- Watch the Pages report for a few weeks; old 404s should drop away as Google follows the redirects.
Redirect mistakes that cost rankings
- Changing URLs that already rank, just to make them "prettier". If a URL works, leave it.
- Redirecting everything to the homepage.
- Using 302 redirects for permanent moves.
- Deleting redirects a few months later.
- Long redirect chains after several redesigns.
Planning a redesign?
Build your redirect map before launch, not after the traffic drops. Our guide to redesigning a website without losing SEO walks through the full process, and the redirect map spreadsheet below has an automatic "redirect needed" column.
Download the free plugin to log 404 errors and add redirects in one click.
Download the files
Free to use in your own and client projects · no sign-up · tested before upload. Always try files on a staging site first and keep a backup.
-
SWS Site Fixer plugin (free WordPress plugin)sws-site-fixer-v1.0.0.zip · 25.8 KB · v1.0.0Download SWS Site Fixer plugin (free WordPress plugin) (25.8 KB)
-
Website redesign SEO & redirect map (Excel)website-redesign-seo-redirect-map.xlsx · 6.9 KB · v1.0Download Website redesign SEO & redirect map (Excel) (6.9 KB)
Download not working? Tell me and I'll fix it.
Frequently asked questions
What is the difference between a 301 and a 302 redirect?
A 301 redirect means the page has moved permanently, so search engines transfer its signals to the new URL. A 302 means the move is temporary and the old URL should stay in search results. Use 301 for changed or deleted pages.
Are 404 errors bad for SEO?
A few 404s for pages that genuinely no longer exist are normal and do not harm your site. The problem is when pages that had traffic or links return 404, because that value is lost. Redirect those to the most relevant page.
Should I redirect every 404 to the homepage?
No. Redirecting unrelated URLs to the homepage confuses visitors, and Google often treats it as a soft 404. Redirect each URL to the closest matching page, or let it return 404 if there is no good replacement.
How long should I keep redirects?
Keep 301 redirects for at least a year, and ideally permanently for pages that had links or traffic. Old links on other websites, bookmarks and emails can keep sending visitors for years.
Does WordPress redirect automatically when I change a slug?
WordPress tries to redirect old post slugs to the new ones in some cases, but it is not reliable for pages, categories or bigger structure changes. Add explicit 301 redirects for anything important.


