In short
Redirecting every removed or missing page to the homepage seems convenient: no more visible errors. For Google, it is often a soft 404; for the visitor, it means landing on a page that does not answer their request. The rule: a 301 redirect only to a page that genuinely replaces the old one, otherwise a 404 or a 410. Once this is done, no global rule sends unknown URLs to the homepage, and every existing redirect points to a relevant equivalent.
Why it matters
Google says so in its site move guide: do not redirect many old URLs to a single irrelevant destination, such as the homepage; this can confuse users and may be treated as a soft 404. The documented exception is consolidation: when several pages have been merged into one, redirecting the old ones to the consolidated page is correct.
A soft 404 has the drawbacks of an error without its clarity:
- Signals not passed on: if Google treats the redirect as a soft 404, it no longer works as a move; the backlinks that pointed to the old page are then unlikely to benefit the homepage.
- Muddled reports: the URLs appear under “Soft 404” or “Page with redirect” instead of “Not found (404)”, and the real issues get lost in the mass.
- Lost visitor: they were looking for an article, a product or a help page, land on the homepage without explanation, and leave.
- Links cited by AI assistants: when a generative engine cites an old URL, the user who clicks lands on the homepage instead of a clear message or an equivalent page.
Global rules are often invisible: a WordPress plugin option, a badly written ErrorDocument line, a try_files fallback to /, a Cloudflare rule with a wildcard.
What it improves
- Indexing and reports Fewer soft 404s, readable exclusion reasons in Search Console.
- Link equity Targeted redirects to a real equivalent keep the benefit of backlinks, which a redirect to the homepage does not.
- Experience and conversion The visitor lands on the page that answers their request, or on a 404 page that helps them find it.
- Crawling URLs with no equivalent return 404 or 410, and crawlers come back to them less and less often.
- Rankings No direct effect on the homepage; the effect is on the pages that recover the signals of their old URLs.
How to check
1. Test a URL that never existed, for each page type:
for chemin in "/page-inexistante-$RANDOM" "/blog/article-inexistant-$RANDOM" "/produits/produit-inexistant-$RANDOM"; do
curl -s -o /dev/null -w "%{http_code} -> %{redirect_url} $chemin\n" "https://example.com$chemin"
done
Compliant: 404 with no destination. A 301 or a 302 to https://example.com/ reveals a global rule.
2. Test the known old URLs. Export them from Search Console (Page indexing report, “Page with redirect” and “Not found (404)” reasons), from your backlinks and from the logs into an anciennes.txt file. Then follow each redirect to the end:
while read -r url; do
curl -s -L -o /dev/null -w "%{http_code} %{url_effective} $url\n" "$url"
done < anciennes.txt | awk '$2 == "https://example.com/" {n++; print} END {print n+0, "URLs end up on the homepage"}'
A few URLs legitimately redirected to the homepage (former homepage, index.php) are normal. Dozens of content pages are not.
3. Search Console. Open the Page indexing report, “Soft 404” reason: examples that redirect to the homepage confirm the problem.
4. Crawl in list mode. In Screaming Frog, Mode > List, paste the old URLs, then look at the redirects export (Reports menu): the final destination column shows where each URL ends up.
How to implement
Before you start
Build a mapping table before touching the rules. One row per old URL that has traffic, backlinks or citations:
| Old URL | Original content | Destination | Code | Rationale |
|---|---|---|---|---|
/blog/choisir-velo-ville-2021/ |
Buying guide | /blog/choisir-velo-ville/ |
301 | Updated version of the same guide |
/produits/casque-urbain-v1/ |
Discontinued product | /produits/casque-urbain-v2/ |
301 | Direct successor |
/blog/promo-ete-2022/ |
Expired offer | none | 410 | No equivalent page |
/aide/ancien-formulaire/ |
Help page | /aide/contact/ |
301 | Same need: contacting support |
/actualites/salon-2019/ |
Dated news item | none | 404 | No equivalent, few links |
The relevance test: does a visitor who was looking for the old page find their answer on the destination? If so, 301. If the destination is only a general section (category, homepage), prefer a 404 or a 410 with an error page that suggests that section. Redirecting to a category is not forbidden, but it must remain the exception and be justified by the content.
Sources for filling in the table: comprehensive redirect map (opens in a new tab), mapping old URLs to equivalents (opens in a new tab), backlinks, landing pages in Analytics.
Then, on each environment: remove the global rule, add the targeted redirects, and let the other URLs return 404 or 410.
Apache
Versions Apache 2.4.
Look for global rules in the virtual host and the .htaccess files:
grep -rnE "ErrorDocument 404 (https?://|/ *$)|RewriteRule .*\s/\s*\[.*R=30[12]" /etc/apache2/ /var/www/ --include="*.conf" --include=".htaccess"
Replace a configuration like this one:
# To remove: sends everything else to the homepage
ErrorDocument 404 https://example.com/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ https://example.com/ [R=301,L]
with targeted redirects and a real error page:
ErrorDocument 404 /404.html
Redirect 301 /blog/choisir-velo-ville-2021/ https://example.com/blog/choisir-velo-ville/
Redirect 301 /produits/casque-urbain-v1/ https://example.com/produits/casque-urbain-v2/
Redirect gone /blog/promo-ete-2022/
Reload with sudo apachectl configtest && sudo systemctl reload apache2.
Nginx
Versions Nginx 1.18 and later.
Configurations to look for in /etc/nginx/:
sudo grep -rnE "error_page 404 .*=30[12]|error_page 404 +/ *;|try_files .* / *;|return 30[12] +(https?://[^/]+)?/ *;" /etc/nginx/
The forms error_page 404 =301 /;, error_page 404 = @accueil; or try_files $uri $uri/ /; send any unknown URL to the homepage. Replace them with a redirect table:
# http context
map $uri $nouvelle_url {
default "";
/blog/choisir-velo-ville-2021/ /blog/choisir-velo-ville/;
/produits/casque-urbain-v1/ /produits/casque-urbain-v2/;
}
# server block
if ($nouvelle_url) {
return 301 $nouvelle_url;
}
error_page 404 /404.html;
location = /404.html {
internal;
}
For a PHP application, keep try_files $uri $uri/ /index.php?$args;: it is up to the application to return 404. Reload with sudo nginx -t && sudo systemctl reload nginx.
Cloudflare
Versions Cloudflare dashboard, all plans, November 2026.
Open the Rules overview and review the Single Redirects, the legacy “Forwarding URL” Page Rules and, at account level, the Bulk Redirects lists. A rule whose source contains a wildcard (example.com/*) and whose target is https://example.com/ without carrying over the path is a global redirect to the homepage. Delete it and replace it with a Bulk Redirects list built from your mapping table (CSV import: source, target, 301 code). Then purge the cache in Caching > Configuration.
AWS
Versions AWS console (CloudFront, S3, Application Load Balancer), November 2026.
CloudFront: in Error pages, a custom error response that maps 403 or 404 to /index.html with a 200 code returns the homepage for any unknown URL. Keep the 404 code and a dedicated /404.html page. Targeted redirects are handled with a CloudFront Function (location header and statusCode: 301) or at the origin.
S3 static website hosting: check the bucket's routing rules (RoutingRules). A rule conditioned on HttpErrorCodeReturnedEquals: 404 that redirects to / reproduces the problem.
Application Load Balancer: check that the listener's default rule is not a redirect to /.
Plesk
Versions Plesk Obsidian 18.0.
Review Websites & Domains > your domain > Apache & nginx Settings, the additional directives fields, as well as the domain's error pages (Virtual Directories > Error Documents, depending on the version). Then apply the blocks from the Apache or Nginx sections.
cPanel
Versions cPanel & WHM 110 and later, Jupiter theme.
In Domains > Redirects, the list of active redirects shows for each one whether the “Wild Card Redirect” option is checked. A wildcard redirect of / to the homepage, or of a whole folder to /, must be deleted. Recreate the targeted redirects one by one, or paste them into public_html/.htaccess.
Shared hosting
Some hosts offer an option in their customer area along the lines of “redirect missing pages to the homepage”: turn it off. Then apply the block from the Apache section in the .htaccess file at the site root.
WordPress
Versions WordPress 6.4 to 7.1; Rank Math 1.0.x and Redirection 5.x plugins.
Global rules almost always come from a plugin:
- Dedicated plugins (“All 404 Redirect to Homepage” and the like): deactivate and delete them.
- Rank Math:
Rank Math > General Settings > Redirections, Fallback Behavior setting: choose the default 404 rather than the redirect to the homepage. - Redirection: check that no regular expression rule such as
^/.*targets/, and use its 404 log to feed the mapping table. - Theme: a
404.phpthat callswp_redirect( home_url() )has the same effect. Replace it with a real 404 template.
Then create the targeted redirects in your redirect plugin. Clear the page cache before testing with curl.
Shopify
Versions Shopify admin, all plans, November 2026.
Shopify returns a real 404 by default. The problem comes from apps that automatically redirect 404s or from a /* URL redirect to /. Turn off the app's global redirect feature, keep only the targeted redirects in the URL redirects list (Content > Menus, then URL redirects), and polish templates/404.json with search and the main collections.
Laravel
Versions Laravel 10 to 13.
A fallback route that redirects is the usual cause:
// To remove
Route::fallback(fn () => redirect('/'));
Replace it with a redirect table and let Laravel return 404 for everything else:
Route::permanentRedirect('/blog/choisir-velo-ville-2021', '/blog/choisir-velo-ville');
Route::permanentRedirect('/produits/casque-urbain-v1', '/produits/casque-urbain-v2');
The error page is customized in resources/views/errors/404.blade.php.
Next.js
Versions Next.js 15 and 16.
Look in next.config.js (or next.config.ts) for a redirect whose source captures everything (/:path*) and points to /, and in proxy.ts (Next.js 16) or middleware.ts (Next.js 15 and earlier) for a NextResponse.redirect(new URL('/', request.url)) that runs when a resource is missing. Replace them with explicit redirects:
// next.config.js
module.exports = {
async redirects() {
return [
{ source: '/blog/choisir-velo-ville-2021', destination: '/blog/choisir-velo-ville', permanent: true },
{ source: '/produits/casque-urbain-v1', destination: '/produits/casque-urbain-v2', permanent: true },
];
},
};
permanent: true produces a 308, which Google treats like a 301. For missing resources, call notFound().
Common mistakes
- Redirecting 404s to the homepage “to keep the link juice”: Google may treat these redirects as soft 404s, which cancels out the expected benefit.
- Swapping the homepage for a generic category: same problem if the category does not answer the original request.
- Redirecting a merged page anywhere other than the consolidated page: consolidation is the case where a grouped redirect is correct, to the right page.
- Removing the global rule without targeted redirects: high-traffic URLs or URLs with backlinks fall into 404 when they had an equivalent.
- Testing only in a browser: it follows the redirect without showing the code. Use
curlwithout-Lto see the first hop. - Forgetting the cache: the CDN and the page cache keep serving the old redirects; Cloudflare keeps 301s for two hours by default if the origin sends no
Cache-Control.
Frequently asked questions
Is redirecting removed pages to the homepage bad for SEO?
Yes, when it is done in bulk. Google states that redirecting many old URLs to an irrelevant destination, such as the homepage, may be treated as a soft 404: the redirect then loses its purpose, and the visitor does not find what they were looking for. Only use a 301 to redirect to an equivalent page; with no equivalent, return a 404 or 410 code.
Can I redirect a removed product to its category?
It is acceptable when the category genuinely meets the need, for example a product line whose models all replace the discontinued product. If the category is just a generic landing spot, it may be treated as a soft 404, like the homepage. The safest option is still a 301 redirect to a direct successor, or a 404 page that suggests the category and search.
Does a 404 page lose its backlinks?
A page returning 404 does not pass on the value of the links pointing to it. If an old URL receives quality backlinks and equivalent content exists, redirect it to that content with a 301. If no equivalent exists, redirecting to the homepage does not necessarily recover that value, since Google may treat the redirect as a soft 404. Consider recreating content that meets the same need instead.
How can I tell if my site redirects 404s to the homepage?
Use curl to request a URL that never existed, for example an address with a random suffix, without following redirects. A 301 or 302 response to the site root reveals a global rule; a 404 response is compliant. Repeat the test for each page type, because the rules often differ between the blog, the products and the rest of the site.
Resources
- Google Search Central: Site moves with URL changesdevelopers.google.com
- Google Search Central: Redirects and Google Searchdevelopers.google.com
- Search Console Help: Page indexing reportsupport.google.com
- Cloudflare: Bulk Redirectsdevelopers.cloudflare.com
- Next.js: redirects in next.config.jsnextjs.org
- Laravel: redirect routeslaravel.com
Updated on
Topic checklist (PDF)