Skip to content

Redirects

Redirects are a critical part of maintaining site quality, SEO health, and user experience. They ensure users and search engines are sent to the correct destination when URLs change.

This guide explains when redirects matter, which tools we use at Terra, and how to choose the right approach depending on the project setup.


A redirect tells the browser and search engines that a URL has moved to a new location.

Common reasons for redirects:

  • Page or slug changes
  • Content consolidation or removal
  • Site restructures or migrations
  • Temporary campaigns or experiments

When implemented correctly, redirects:

  • Preserve SEO value
  • Prevent broken links (404s)
  • Maintain a smooth user experience

Use when a URL is permanently replaced by another.

  • SEO value is transferred to the new URL
  • This is the default choice for most production changes

Use when the change is not permanent.

  • SEO value is not fully transferred
  • Useful for short-term campaigns or testing

Use when a page is intentionally removed with no replacement.

  • Tells search engines the content should be dropped from the index

Redirects in WordPress (Yoast SEO Premium)

Section titled “Redirects in WordPress (Yoast SEO Premium)”

Some projects use Yoast SEO Premium for redirects (e.g. ProsperOps).

  • Editorial changes by non-developers
  • Slug updates on posts or pages
  • Simple 1:1 redirects
  • SEO teams managing redirects without dev involvement
  • Large-scale migrations
  • Bulk redirects
  • Regex-heavy rules
  • Environment-based logic

Yoast redirects are great for content-level changes, but not for structural URL changes.


Redirects in WordPress (Redirection Plugin)

Section titled “Redirects in WordPress (Redirection Plugin)”

For most WordPress projects, we use the Redirection plugin.

  • Full control over:
    • 301 / 302 / 410 status codes
    • Regex-based redirects
    • Conditional logic
  • Import / export support
  • Better logging and debugging
  • Handles large redirect sets reliably
  • Redirects are database-based
  • Should be reviewed during large migrations

This is our default choice for complex or large-scale redirect needs.


For Sanity-based projects, redirects are handled at the application level.

  1. We create a Custom Post Type (CPT) called Redirects in Sanity.
  2. Each redirect includes:
    • from (original path)
    • to (destination URL or path)
    • type (301 permanent or 302 temporary)
  3. Redirect data is fetched from Sanity.
  4. Astro consumes this data and applies redirects at build/runtime.

This approach allows:

  • CMS-managed redirects
  • Clear separation of content and routing logic
  • Support for both internal and external redirects

  • From: /old-page
  • To: /new-page
  • Most common use case
  • From: /campaign
  • To: https://external-site.com/page
  • Useful for partnerships, tools, or off-site flows

Both are supported across our setups.


Redirects are powerful, but they are not a catch-all solution.

Avoid these anti-patterns:

  • Using redirects to hide broken internal linking
  • Redirecting everything to the homepage
  • Long redirect chains (A → B → C)
  • Using redirects instead of proper canonicals or noindex rules

If a URL shouldn’t exist, decide clearly:

  • Redirect it
  • Noindex it
  • Or return a proper 404 / 410

  • Decide redirects early, especially during restructures
  • Prefer 301 redirects unless there’s a clear reason not to
  • Keep redirect rules simple and intentional
  • Document large redirect changes
  • Validate redirects before saying “it’s fixed”

Knowledge Check

Test your understanding of this section

Loading questions...