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:
When to Use Which Redirect
The most common redirect decision points in WordPress and the correct response for each:
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.
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.
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.
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:
/page?s= from indexing via robots.txt or add noindex to the search template. Search URLs should never appear in Google's index.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.
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.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.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.
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.
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.
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.
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.
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.


