WHA Docs

Managing Redirects

When and how to set up URL redirects — plugin-managed vs server-level.

When to Redirect

Set up a redirect any time a URL changes:

  • A page slug is renamed
  • A page is removed or consolidated into another
  • A provider leaves the practice (redirect their page to the provider listing)
  • An old URL structure is replaced (e.g., the site redesign migrated many legacy paths)

Broken URLs hurt SEO and user experience. The Redirection plugin tracks 404s, so check it periodically for URLs that need redirects.

Redirection Plugin (wp-admin)

Most redirects are managed through the Redirection plugin in wp-admin at Tools → Redirection.

To add a redirect:

  1. Go to Tools → Redirection
  2. Enter the Source URL (the old path, e.g., /old-page/)
  3. Enter the Target URL (the new path, e.g., /new-page/)
  4. Set the HTTP code — use 301 (permanent) for most cases, 302 (temporary) for short-term redirects
  5. Save

The plugin handles pattern matching (regex), URL parameters, and logging. It also shows 404 logs to identify URLs that need redirects.

Redirect CSVs

The redirects/ directory in the repo contains CSV files used during the site redesign migration:

  • redirect-rules.csv — Active redirect rules
  • url-mapping.csv — Full URL mapping from the old site to the new site (~89k rows)

These were used for the initial migration and are kept as a reference. New redirects should be added through the Redirection plugin, not these files.

Server-Level Redirects

Some redirects are handled at the Nginx level in src/nginx.conf:

  • /wp-admin/wp/wp-admin/
  • /wp-login.php/wp/wp-login.php

These are structural redirects that can't change — they exist because WordPress core lives in the /wp/ subdirectory. Don't remove them.

The redirects.php mu-plugin handles additional server-level redirects that need to run before WordPress fully loads.

Best Practices

  • Always use the Redirection plugin for content redirects — it's auditable, searchable, and doesn't require a deploy
  • Use 301 (permanent) unless the redirect is genuinely temporary
  • Don't chain redirects — if /a redirects to /b and /b redirects to /c, update /a to point directly to /c
  • Check 404 logs periodically in Tools → Redirection to catch broken links

On this page