Menu

Stop redirecting every 404 to your homepage (a WordPress fix)
πŸ“°

Stop redirecting every 404 to your homepage (a WordPress fix)

DEV CommunityΒ·arvand ecommerceΒ·7 days ago
#QB81mTll
#dev#redirect#homepage#search#test
Reading 0:00
15s threshold

Many WordPress sites have a setting, either in an SEO plugin or a small redirect plugin, that sends every missing URL to the homepage. It looks tidy: users never see an error page. For search engines it causes three problems:

Google treats these as soft 404s. A homepage served for /some-deleted-post/ is not a real answer, so Google ignores it.

Link value from old URLs is lost. An old page with backlinks should redirect to its closest topical match, not to the homepage.

You lose visibility into broken URLs. Real 404s show up in Search Console's "Not found" report. A blanket redirect hides them.

How to fix it

Turn off the "redirect all 404s to homepage" option. In Rank Math, this is the fallback behaviour in the Redirections settings; set it to the default 404 page.

Test with a random URL ( /zzz-test/ ).…

Continue reading β€” create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.