How to Set Up 301 Redirects After Fixing Broken Links
A 301 redirect is one of the most important tools in SEO maintenance. It tells search engines and browsers that a URL has permanently moved, passes accumulated link equity to the new destination, and keeps users from hitting dead ends.
Done right, a redirect is invisible. Done wrong - wrong destination, redirect chain, or missing entirely - and you’re quietly losing equity every day the problem persists.
This guide covers the mechanics of setting up 301 redirects correctly, platform by platform, with the common mistakes explained so you can avoid them.
Why 301 and Not Any Other Status Code
There are several redirect status codes and the differences matter:
- 301 Moved Permanently - the URL has permanently changed. Search engines update their index to the new URL and pass link equity. Use this for broken links, moved pages, deleted content with equivalents.
- 302 Found (Temporary) - the URL has temporarily moved. Search engines keep the original URL indexed and do not reliably pass equity. Use this only for genuinely temporary redirects (A/B tests, maintenance pages).
- 307 Temporary Redirect - HTTP/1.1 equivalent of 302. Same rules apply.
- 308 Permanent Redirect - like a 301 but preserves the HTTP method. Rarely needed for standard SEO purposes.
When fixing broken links, you almost always want 301. A common mistake is using a 302 by default - many server configurations default to 302 unless you specify otherwise. Always confirm the status code after setting up a redirect.
Step 1: Choose the Right Redirect Target
The effectiveness of a 301 redirect depends partly on how closely related the destination is to the original page.
Google uses topical relevance as part of evaluating how much equity to pass through a redirect. A redirect from a deleted blog post about “GDPR compliance” to another post about “data privacy regulations” passes more equity than the same redirect pointing to your homepage.
Hierarchy for choosing a destination:
- An updated version of the same content at a new URL (best - preserve as much context as possible)
- The most topically relevant page on the same subject
- The parent category or topic hub page
- The homepage (last resort - passes the least equity and Google may treat it as a soft 404)
If no relevant destination exists, consider whether recreating the content at the original URL is worth the effort - especially if the URL has backlinks.
Step 2: Implement the Redirect
WordPress
Using the Redirection plugin (recommended for most users):
- Install and activate the free Redirection plugin by John Godley
- Go to Tools -> Redirection
- In the “Add new redirection” panel:
- Source URL: the old broken URL path (e.g.
/old-post-slug/) - Target URL: the destination (e.g.
/new-post-slug/) - HTTP Code: 301
- Source URL: the old broken URL path (e.g.
- Click Add Redirect
Using .htaccess (Apache servers, no plugin needed):
# Single redirect
Redirect 301 /old-page/ https://yoursite.com/new-page/
# Pattern-based redirect (e.g. old category structure)
RedirectMatch 301 ^/old-category/(.*)$ https://yoursite.com/new-category/$1
Place these rules in your .htaccess file, above any existing WordPress rewrite rules.
Using WP-CLI for bulk redirects:
If you are managing dozens of redirects after a URL restructure, the Redirection plugin supports CSV import. Export your redirect map as CSV and import it directly - far faster than adding each redirect manually.
Webflow
- Open your Webflow project
- Go to Project Settings -> Hosting tab
- Scroll to 301 Redirects
- Enter the Old Path (e.g.
/old-page) and New Path (e.g./new-page) - Click Add, then Save
- Republish your site - Webflow redirects only take effect after publishing
Webflow supports wildcard redirects using *. For example, /old-blog/* -> /blog/* will redirect all URLs under the old path structure to the equivalent path under the new one.
Squarespace
- Go to Settings -> Advanced -> URL Redirects
- Enter the old path in Original URL and the destination in Redirect URL
- Click Save
Squarespace redirects take effect immediately without republishing. Note that Squarespace does not support wildcard patterns - each redirect must be entered individually.
Apache (.htaccess) - non-WordPress
# Permanent redirect
Redirect 301 /old-page https://yoursite.com/new-page
# Redirect entire old directory
RedirectMatch 301 ^/old-section/(.*)$ https://yoursite.com/new-section/$1
# HTTPS redirect (if not handled at server level)
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
Nginx
# Single page redirect
location = /old-page {
return 301 https://yoursite.com/new-page;
}
# Pattern-based redirect
location ~ ^/old-section/(.*)$ {
return 301 https://yoursite.com/new-section/$1;
}
Reload Nginx after changes: sudo nginx -s reload
Cloudflare (CDN-level redirects)
If you use Cloudflare in front of your site, you can create redirect rules under Rules -> Redirect Rules without touching your server config. This is useful for sites where you do not have direct server access, or for implementing redirects across multiple origin servers.
Step 3: Check for and Resolve Redirect Chains
A redirect chain occurs when URL A redirects to URL B, which redirects to URL C. The user and crawler eventually reach URL C, but the journey through multiple hops has costs:
- Each hop loses a small amount of link equity
- Each hop adds latency (round-trip HTTP requests)
- Chains of 5+ hops can cause browsers and crawlers to stop following them entirely
Redirect chains are almost always caused by adding new redirects on top of existing ones without checking what is already in place.
Example: You have /page-v1/ -> /page-v2/ as an existing redirect. You rename /page-v2/ to /page-v3/ and add /page-v2/ -> /page-v3/. Now you have a chain: /page-v1/ -> /page-v2/ -> /page-v3/.
The fix is simple: update the original redirect to go directly to the final destination: /page-v1/ -> /page-v3/.
How to detect chains:
curl -I -L https://yoursite.com/old-page/
The -L flag follows all redirects. If you see more than one Location: header in the output, you have a chain.
Alternatively, run a broken link audit with redCacti - the report flags redirect chains alongside broken links.
Step 4: Update Internal Links to Skip the Redirect
Once a redirect is in place, external links are handled automatically. Your own internal links are a different matter - they should point directly to the final destination, not through a redirect.
This is not urgent in the way a 404 is urgent, but redirect chains on internal links are a common side effect of maintenance work that slowly accumulates over time.
Find internal links pointing through redirects:
A site crawl will flag these. Look for any internal link that results in a 3xx response rather than a 200. These are links that should be updated to point directly to the destination.
On WordPress, use a database search-and-replace to update old URL patterns in bulk. On Webflow and Squarespace, you will need to update them manually in the editor for each page.
Step 5: Verify Each Redirect Is Working
Do not assume a redirect is working because you configured it. Verify each one.
Quick test with curl:
curl -I https://yoursite.com/old-page/
Look for:
HTTP/1.1 301 Moved Permanently(orHTTP/2 301)Location: https://yoursite.com/new-page/pointing to the right destination
Then hit the destination:
curl -I https://yoursite.com/new-page/
Look for: HTTP/1.1 200 OK
Things to check beyond the basic test:
- Does
/old-page(without trailing slash) redirect correctly? - Does
/old-page/(with trailing slash) redirect correctly? - Does
http://yoursite.com/old-page/redirect correctly (not just the https version)? - Does
www.yoursite.com/old-page/redirect correctly?
Each variation can behave differently depending on how your redirects are configured.
Step 6: Remove Redirected URLs from Your Sitemap
After your redirects are in place, clean up your sitemap. A sitemap that contains URLs returning 301 wastes crawl budget on pages that just pass crawlers along to somewhere else.
What your sitemap should contain: Only canonical URLs that return HTTP 200.
On most CMS platforms, removing or properly redirecting a page will automatically update the sitemap on the next publish. If your sitemap is manually maintained or auto-generated by a plugin, regenerate it after implementing your redirects.
Check the result at yoursite.com/sitemap.xml and verify none of the listed URLs redirect. A quick sitemap validator helps confirm the file is clean before you resubmit it.
Common Mistakes to Avoid
Redirecting everything to the homepage. Google recognises when a site redirects many different URLs to the same generic destination and treats these as soft 404s. The equity does not pass.
Using 302 instead of 301. A 302 tells search engines the move is temporary. Google keeps the original URL indexed rather than updating to the new one. Equity does not reliably transfer.
Adding a redirect without checking for existing redirects. Creates chains. Always check what is already in place before adding a new redirect.
Never removing redirects. Old redirects from years-ago migrations still fire on every request to those URLs. They add latency and create maintenance debt. Redirects for URLs with no backlinks and no traffic can often be cleaned up after 12-18 months.
Forgetting HTTPS and www variations. A redirect from /old-page/ to /new-page/ only covers the exact path. You may also need to handle http:// to https:// and www. to non-www at the server level.
Redirect Management Checklist
For each broken link being fixed with a redirect:
- Identified the most topically relevant destination URL
- Implemented 301 redirect using appropriate platform method
- Checked for existing redirects from this URL (to avoid chains)
- Verified redirect returns 301 status code with
curl -I - Verified destination URL returns 200 status code
- Updated internal links on site to point directly to destination
- Removed the old URL from sitemap.xml
- Checked redirect works with and without trailing slash
Redirects are one of those things that seem simple and become messy at scale. The process above keeps them clean: one hop to a relevant destination, internal links updated, sitemap cleared, each redirect verified before moving on.
Audit your site for broken links and redirect chains ->
The free sitemap audit flags both 404 errors and multi-hop redirect chains so you can fix them together.
Also in this series: How to Fix a 404 Error Without Losing SEO Equity - How to Find Broken Links on Your Website
Newsletter
Weekly SEO teardowns
Internal linking, broken links & orphan pages — straight to your inbox, every week.