Title: If 404 redirect
Last modified: March 31, 2026

---

# If 404 redirect

 *  [em920](https://wordpress.org/support/users/em920/)
 * (@em920)
 * [1 month, 1 week ago](https://wordpress.org/support/topic/if-404-redirect/)
 * I’m trying to use redirection to help us manage our closed careers pages. Is 
   it possible to set this up so it essentially says if (careers page) would return
   a 404/301 error, redirect to ‘Vacancy Closed’ page but if the original page is
   live, do not redirect?

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Thread Starter [em920](https://wordpress.org/support/users/em920/)
 * (@em920)
 * [4 weeks, 1 day ago](https://wordpress.org/support/topic/if-404-redirect/#post-18874857)
 * Hi,
   Any advice on this problem?Thanks
 *  [alexfv](https://wordpress.org/support/users/alexfv/)
 * (@alexfv)
 * [2 days, 21 hours ago](https://wordpress.org/support/topic/if-404-redirect/#post-18898339)
 * This is a built-in match in Redirection. You don’t need any external check.
 * When adding the redirect:
 * 1. **Source URL**: pattern matching `/careers/(.*)` (toggle Regex if you want
   to catch sub-pages)
 * 2. **URL options** (click *More options* on the source URL row): change *When
   matched* from `URL only` to `URL and HTTP status code`
 * 3. **HTTP status code**: `404`
 * 4. **Target URL**: your *Vacancy Closed* page
 * Now the redirect fires only when the careers URL would otherwise 404. As long
   as the page exists and returns 200, nothing happens.
 * A couple of gotchas: Some caching layers (Cloudflare, server-level page cache)
   keep serving a cached 404 long after the page comes back. If you re-add a vacancy
   and it still hits the redirect, clear those caches. A few themes return `200 
   OK` on their custom 404 template (for SEO reasons). If yours does that, the match
   won’t fire, because the actual status code isn’t 404. Quick check: `curl -I https://
   yoursite.com/careers/old-job` should return `HTTP/1.1 404`.
 * Does your careers page get rebuilt regularly, or is this more of a one-off cleanup?
   That changes whether you want the redirect to be permanent or scoped to specific
   URLs.

Viewing 2 replies - 1 through 2 (of 2 total)

You must be [logged in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fif-404-redirect%2F%3Foutput_format%3Dmd&locale=en_US)
to reply to this topic.

 * ![](https://ps.w.org/redirection/assets/icon-256x256.jpg?rev=983639)
 * [Redirection](https://wordpress.org/plugins/redirection/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/redirection/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/redirection/)
 * [Active Topics](https://wordpress.org/support/plugin/redirection/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/redirection/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/redirection/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [alexfv](https://wordpress.org/support/users/alexfv/)
 * Last activity: [2 days, 21 hours ago](https://wordpress.org/support/topic/if-404-redirect/#post-18898339)
 * Status: not resolved