WordPress 301 Redirects and 404 Errors – Complete Guide

Published: May 21, 2026 · Author: Marcin Szewczyk-Wilgan

Every time you change a URL, delete a page, or restructure a WordPress site, you create a decision point: what should happen when someone – or Google – visits the old address? Get it right and link equity transfers cleanly, users land where they expect, and Googlebot uses its crawl budget efficiently. Get it wrong and you end up with broken redirect chains, lost rankings, and a 404 page that sends visitors away empty-handed. This guide covers everything you need to handle redirects and 404 errors correctly in WordPress.

HTTP Status Codes That Matter

The HTTP status code a URL returns tells browsers and search engines how to treat it. The codes most relevant to redirects and missing pages are:

301 Moved PermanentlyThe content at this URL has permanently moved to a new location. Browsers cache this redirect; search engines transfer virtually all link equity to the destination and eventually update their index to the new URL. Use for permanent URL changes: restructuring, domain migration, HTTP to HTTPS.
302 Found (Temporary)The content is temporarily at a different URL and will return. Browsers do not cache this; search engines keep the original URL indexed and do not transfer link equity. Use sparingly and correctly – only when the move is genuinely temporary (A/B testing, maintenance pages). Many sites mistakenly use 302 for permanent moves, losing link equity in the process.
404 Not FoundThe requested URL does not exist. Search engines eventually remove 404 URLs from the index. The page should actually return HTTP 404 status – not 200 with a "not found" message. WordPress returns correct 404 status for its 404.php template by default.
410 GoneThe resource has been permanently removed and will not be reinstated. More explicit than 404 for intentional deletion. Google may process 410s faster for index removal than 404s. Use when you have definitively removed content and want to signal this clearly.
200 (the wrong answer)A page that returns 200 but has no real content – an empty category page, a product page for a discontinued item with no alternatives – creates a "soft 404." From Google's perspective this is a page worth indexing; from the user's perspective it is a dead end. This is one of the most common WordPress SEO mistakes.

When to Use Which Redirect

The most common redirect decision points in WordPress and the correct response for each:

URL change

Renaming a post or page slug

When you change a WordPress post slug, WordPress adds a 301 redirect from the old URL automatically – but only in the database, not at the server level. For sites with traffic and backlinks, verify the redirect is working after any slug change and consider server-level redirects for high-value pages.

Domain migration

Moving to a new domain

A domain migration requires 301 redirects from every old URL to its equivalent new URL. Use a wildcard catch-all redirect only as a last resort; mapping individual URLs preserves the most link equity. Update the Site URL in WordPress settings, update all internal links, and submit the new sitemap to Search Console.

HTTP → HTTPS

All HTTP requests should redirect to HTTPS with a 301. Configure this at the web server level (not in WordPress) for performance. WordPress will then see only HTTPS requests. Ensure the WordPress Address and Site Address in Settings → General both use HTTPS to avoid redirect loops.

Trailing slash

Consistency matters

WordPress permalink settings define whether URLs end with a trailing slash. Mixed usage (some pages with, some without) creates duplicate content. Enforce consistency with a 301 from the non-preferred variant to the preferred one. Set this at the web server level to avoid WordPress processing the redirect.

Soft 404s – The Hidden SEO Problem

Soft 404s are pages that return HTTP 200 but contain no meaningful content. They waste crawl budget, dilute the perceived quality of your site, and frustrate users. Common sources in WordPress:

Empty category pagesA category with no published posts returns HTTP 200 with a template that shows nothing. Return 404 or redirect to the parent category. Better: add a page to the category before making it public.
Empty paginationPage 2 of a category with only 3 posts, when your posts-per-page is set to 10, is empty. WordPress generates the URL anyway. These should return 404 or be blocked from indexing with canonical pointing to page 1.
Empty search resultsSearch result pages for queries that return zero results. Block /page?s= from indexing via robots.txt or add noindex to the search template. Search URLs should never appear in Google's index.
Out-of-stock productsWooCommerce product pages for discontinued items. If the product is permanently gone, return 410 or redirect to a relevant category. If temporarily out of stock, keep the page live but use structured data to indicate availability, so the URL retains its ranking potential.
Tag archives with one postTags created for a single post provide very little value as index pages. Noindex low-value tag archives or set a canonical pointing to the post itself, depending on your content strategy.

Redirect Chains and Loops

Redirect chains (A → B → C) and redirect loops (A → B → A) are two of the most performance-damaging issues in WordPress sites, especially those that have grown through multiple migrations or plugin changes.

ChainsEvery hop in a redirect chain adds latency for users and a small PageRank transfer loss. Google follows chains up to 10 hops but becomes less reliable at passing equity through longer chains. Collapse all chains so A redirects directly to the final destination. Run Screaming Frog monthly to detect chains before they accumulate.
LoopsA redirect loop causes ERR_TOO_MANY_REDIRECTS in browsers. Common causes in WordPress: conflicting redirects between an SEO plugin and the web server configuration, an HTTP→HTTPS redirect where WordPress still generates HTTP URLs, or a cached redirect pointing to a URL that now redirects back. Clear browser and server-side cache first when debugging loops.
Finding chainsUse curl -I -L https://yoursite.com/old-url from the command line to trace the full redirect path. Screaming Frog's Redirect Chains report is the most efficient way to audit an entire site. Google Search Console's Coverage report also flags redirect errors.
Implementing redirects correctlyServer-level redirects (Nginx rewrite rules, Apache RewriteRule in .htaccess) are fastest and most efficient. WordPress plugin redirects (Redirection, Yoast SEO, Rank Math) are easier to manage but add PHP processing overhead per request. For high-traffic sites, move frequently-hit redirects to the web server configuration.

Designing a Good 404 Page

A visitor who lands on a 404 page is one navigation step away from leaving forever. A well-designed 404 page keeps them on the site and reduces the SEO damage of broken links.

Must return 404

The HTTP status is non-negotiable

Your 404 page must return HTTP status 404, not 200. This sounds obvious but many WordPress themes and plugins accidentally return 200 on the 404 template. Check with curl -o /dev/null -w "%{http_code}" https://yoursite.com/nonexistent-page. A 200 status turns your 404 page into a soft 404 itself.

Search form

Give visitors a way forward

Include a search form prominently. When a visitor lands on a 404, they were looking for something specific. A search form lets them try again. Include popular content links below the search box for users who do not know exactly what to search for.

Navigation

Main menu and category links

Include the main navigation or at least the top-level categories. Some visitors will browse from a 404 if you give them an easy starting point. A clear link back to the homepage is the minimum; a full set of section links is better.

Helpful messaging

Explain without apologizing excessively

Briefly explain the page was not found and offer the most likely reasons (URL changed, content removed). Avoid lengthy apology paragraphs. Include a link to the sitemap or contact page for users who need specific help finding something.

Auditing and Ongoing Maintenance

Redirect and 404 management is not a one-time task. New 404s appear whenever external sites link to changed URLs, when WordPress generates new URL patterns, or after plugin/theme updates.

Google Search ConsoleThe Coverage report shows 404 errors Googlebot encountered. The “Not found (404)” section under Pages shows which URLs Google tried to crawl that returned 404. Check this monthly and add redirects for any URL that has incoming links or historical traffic. Search Console does not show 410 errors separately.
Screaming FrogCrawl your site monthly with Screaming Frog to catch redirect chains, redirect loops, broken internal links, and soft 404s before Googlebot finds them. Filter by status code to quickly isolate 3xx and 4xx responses. The Redirect Chains tab shows chains by length for prioritization.
Server logsAccess logs contain every 404 a server returns, including requests from bots, social media links, and visitors that do not appear in Search Console (non-Google bots, non-Chrome browsers). Tools like GoAccess or AWStats aggregate these into readable reports. High-volume 404s for the same URL indicate an external link worth redirecting.
Redirection pluginThe Redirection plugin for WordPress provides a central dashboard for managing 301/302/410 redirects, automatically logging 404s, and importing redirect lists via CSV. For sites managed by non-technical editors, it is more practical than direct server configuration changes.

Summary

Correct handling of redirects and 404 errors is foundational to WordPress SEO and site health. The core rules are straightforward: use 301 for permanent moves, 410 for deliberate removal, and ensure your 404 page actually returns HTTP 404. Actively prevent soft 404s, eliminate redirect chains, and monitor Search Console for new 404 errors monthly. These are unglamorous maintenance tasks, but they consistently deliver measurable SEO improvements on any site that has grown and changed over time.

Need Help with WordPress?

If you have questions after reading the articles or need support – we are at your disposal. No commitments, no marketing jargon – a concrete proposal after a brief conversation.

Phone

+48 608 271 665

Mon–Fri, 8:00–16:00 CET

E-mail

contact@weboptimo.pl

We respond within 24h

Company

WebOptimo

VAT ID: PL6391758393