How to Redirect URLs in WordPress

Redirecting URLs in WordPress is an important part of maintaining a healthy website when pages are renamed, moved, deleted or reorganised. A properly configured redirect can send visitors from an old URL to the correct destination, reduce unnecessary 404 errors and help search engines understand changes to your website structure.

The most common option is a 301 redirect, which is generally used when a URL has permanently moved. WordPress website owners can create redirects manually, through server configuration, or with a dedicated redirect management plugin.

What Is a URL Redirect?

A URL redirect automatically sends a visitor or request from one web address to another.

For example, suppose a page originally uses:

/old-services/

You later replace it with:

/services/

Instead of allowing visitors to reach a missing page, you can create a redirect from the old URL to the new one.

The visitor requests the old address, and WordPress or the web server sends them to the new destination.

Redirects are useful for:

  • Renamed pages
  • Changed permalink structures
  • Deleted or replaced content
  • Website migrations
  • Domain changes
  • Restructured categories
  • Moved products
  • Changed blog URLs
  • Consolidated duplicate content
  • Broken internal links
  • Legacy URLs that still receive traffic

Without appropriate redirects, old links can lead to 404 errors and create unnecessary problems for visitors and website administrators.

Why Redirect URLs in WordPress?

Websites change over time. A page that is correct today may have a different URL several months later.

You might change a page title and permalink, reorganise your navigation, move content into a different category or replace an old article with a newer version.

External websites may still link to the previous URL, while visitors may have saved the old address in their bookmarks. Search engines can also have existing URLs in their indexes.

A redirect provides a controlled way to handle those requests.

For example:

Old URL:
example.com/wordpress-security-tips/

New URL:
example.com/wordpress-security-guide/

A redirect can send requests for the old address to the new page automatically.

This means visitors do not have to find the new URL themselves.

Which WordPress Redirect Should You Use?

The appropriate redirect depends on what you are trying to achieve.

301 Permanent Redirect

A 301 redirect indicates that a URL has permanently moved.

It is commonly used when:

  • A page has been permanently renamed
  • Content has moved to a new URL
  • A website has been restructured
  • A domain has changed
  • An old page has been replaced by a new page
  • A permalink structure has changed

For a permanent URL change, a 301 redirect is usually the most appropriate choice.

302 Temporary Redirect

A 302 redirect indicates that the destination is temporary.

It can be useful when you need to send visitors somewhere else temporarily without treating the new destination as the permanent replacement.

For example, a temporary campaign or short-term website change may require a temporary redirect.

307 Temporary Redirect

A 307 redirect is another temporary redirect type. It preserves the HTTP request method, which can be relevant in technical situations where request behaviour matters.

308 Permanent Redirect

A 308 redirect is a permanent redirect that also preserves the HTTP request method.

For straightforward WordPress page moves, 301 redirects are commonly sufficient, but 308 redirects can be useful for specific technical requirements.

410 Gone

A 410 response is different from a redirect.

It indicates that content has been permanently removed and there is no replacement destination.

If an old page has genuinely disappeared and there is no relevant replacement, returning 410 Gone can be more appropriate than redirecting visitors to an unrelated page.

A 451 response indicates that content is unavailable for legal reasons.

This is intended for specific circumstances where access to the requested resource is restricted for legal reasons.

How to Redirect a URL in WordPress

There are several ways to create a WordPress redirect. The best method depends on your technical requirements, hosting environment and the number of redirects you need to manage.

For a small number of technically experienced users, server configuration can work well. However, managing redirects directly from WordPress can be considerably easier when redirects need to be created, reviewed and maintained regularly.

Method 1: Use a WordPress Redirect Plugin

A dedicated redirect plugin provides an administration interface for creating and managing redirects without manually editing server configuration files.

With a redirect management plugin, you can typically specify:

  • Source URL
  • Destination URL
  • Redirect type
  • Matching method
  • Redirect status
  • Redirect group
  • Query-string behaviour
  • Activation status

This approach is particularly useful for websites with multiple redirects or websites that frequently change their content structure.

WPCodeForge Smart Redirects Pro provides a centralised WordPress interface for creating, organising, monitoring and maintaining redirects.

You can create exact URL redirects, prefix-based rules and regular expression rules. The plugin also supports 301, 302, 307 and 308 redirects, along with 410 Gone, 451 and Meta Refresh responses.

This means redirect rules can be managed without manually modifying .htaccess files.

Method 2: Edit Server Configuration

Redirects can also be configured at the web-server level.

For example, an Apache server can use a rule such as:

Redirect 301 /old-page/ /new-page/

This can be efficient for stable, straightforward redirects, particularly on websites where server-level configuration is already part of the maintenance workflow.

However, manually editing server configuration requires care. An incorrect rule can cause unexpected behaviour or make parts of a website inaccessible.

It can also become difficult to manage when a website accumulates hundreds or thousands of redirects.

For this reason, many WordPress administrators prefer to manage redirects through a dedicated interface and move suitable stable rules to server configuration only when appropriate.

How to Redirect an Old WordPress URL to a New URL

One of the most common redirect requirements is moving a page to a new address.

Suppose your original page is:

/wordpress-plugins/

and the new page is:

/wordpress-plugin-directory/

Create a permanent redirect with:

Source: /wordpress-plugins/
Destination: /wordpress-plugin-directory/
Status: 301

Once the rule is active, requests for the old URL can be directed to the new page.

The old URL should remain redirected for as long as it is useful. Removing a redirect too quickly can cause previously published links, bookmarks or search-engine requests to return to an error page.

Changing your WordPress permalink structure can affect a large number of URLs.

For example, a website might originally use:

/blog/how-to-secure-wordpress/

and later change to:

/guides/how-to-secure-wordpress/

Every affected URL should be reviewed.

For important pages, create redirects from the old URLs to their corresponding new URLs.

For larger structural changes, redirect patterns can reduce the amount of manual configuration required.

Smart Redirects Pro supports exact matching, prefix matching and regular expression matching, allowing redirect rules to be created according to the structure of the URL changes.

Use Prefix Redirects for Larger URL Changes

Sometimes an entire section of a website moves.

For example:

/blog/

might be replaced with:

/articles/

Creating an individual redirect for every URL may be unnecessary if the relationship between the old and new structures is consistent.

A prefix-based redirect can be used for situations where an entire URL section follows the same pattern.

This is particularly useful during website restructuring and migrations.

Before implementing a broad rule, test it carefully. A redirect that is too general can send unrelated URLs to the wrong destinations.

Use Regular Expressions for Complex Redirects

Regular expressions can be useful when multiple old URLs follow a predictable pattern.

For example, a website migration may require several variations of old URLs to be redirected according to a common rule.

Regular expressions allow administrators to define matching patterns rather than entering every URL individually.

They are powerful but should be tested carefully. An overly broad regular expression can match URLs that were not intended to be redirected.

For straightforward redirects, exact matching is usually easier to understand and maintain.

Redirecting URLs Without Editing .htaccess

Many WordPress website owners do not want to manually edit .htaccess files whenever a URL changes.

This is one of the reasons a WordPress redirect plugin can be useful.

Smart Redirects Pro provides a dashboard-based system for managing redirects, allowing administrators to create and modify rules from WordPress rather than manually changing .htaccess.

This can make redirect management easier to maintain, particularly for websites with regular content changes.

How Redirects Help With 404 Errors

A 404 error occurs when a requested resource cannot be found.

For example, someone may visit:

example.com/old-product/

after the page has been deleted or renamed.

If the URL has a relevant replacement, a redirect can send the visitor to the new destination instead.

This is particularly useful for:

  • Renamed pages
  • Deleted products with replacements
  • Changed blog URLs
  • Website migrations
  • Broken internal links
  • Old campaign URLs
  • Restructured content

Not every 404 should automatically be redirected. If there is no suitable replacement, keeping the URL as a genuine 404 or using a 410 response may be more appropriate.

Find Broken URLs Before Creating Redirects

Before creating large numbers of redirect rules, identify which URLs are actually causing problems.

WPCodeForge Smart Redirects Pro includes a 404 Monitor that records broken URL requests.

It can show information such as:

  • Broken URL
  • Number of hits
  • Detection engine
  • Referrer
  • Last-seen information
  • Available redirect actions

This allows administrators to identify frequently requested missing URLs and determine which ones need attention.

For example, if an old product URL receives hundreds of requests and a replacement product exists, creating a redirect may be appropriate.

If a URL receives requests from automated scanners and has no legitimate replacement, a redirect may not be necessary.

Redirects are not always the best solution to an internal linking problem.

If one of your WordPress articles contains a link to an old URL on the same website, updating the internal link itself may be preferable.

Smart Redirects Pro includes an Internal Link Scanner that checks published WordPress content for internal absolute URLs pointing towards missing destinations.

This can help identify internal links that need attention.

Where appropriate, you can then either update the link or create a redirect for the old destination.

Monitor Redirect Performance

Creating a redirect is only part of the maintenance process.

You may also want to know whether redirects are being used and which rules receive traffic.

Smart Redirects Pro includes redirect and 404 analytics covering information such as:

  • 404 activity over time
  • Redirects receiving traffic
  • Redirect hit counts
  • Last-hit information
  • Disabled redirects
  • Frequently accessed redirect rules
  • 30-day traffic trends

This can help identify old URLs that continue to receive requests and redirect rules that may require review.

See also  How to Protect SEO When Changing WordPress URLs

Preserve Query Parameters When Necessary

Some URLs contain query parameters.

For example:

/products/?utm_source=newsletter

Query parameters can contain campaign tracking information or other information required by a website.

When creating redirects, consider whether those parameters should be preserved.

Smart Redirects Pro provides query-parameter controls and can recognise common tracking parameters such as:

  • utm_source
  • utm_medium
  • utm_campaign
  • utm_term
  • utm_content
  • gclid
  • fbclid

The appropriate configuration depends on how your website handles tracking and URL parameters.

Avoid Redirect Chains

A redirect chain occurs when one redirect sends a visitor to another redirected URL.

For example:

/old-page/ → /new-page/ → /latest-page/

This is less efficient than directing the original URL straight to the final destination:

/old-page/ → /latest-page/

When updating a website, review existing redirect rules so that old URLs eventually point directly to their intended destinations.

Smart Redirects Pro includes a Prefer Direct Destinations option designed to support maintenance of redirects towards their intended final destinations.

Avoid Redirect Loops

A redirect loop occurs when URLs redirect back to one another.

For example:

/page-a/ → /page-b/

and:

/page-b/ → /page-a/

The browser can become trapped in the cycle and fail to load the requested page.

Redirect rules should therefore be checked carefully before being activated.

Smart Redirects Pro includes validation and diagnostic controls designed to help identify problematic configurations, including obvious self-referencing rules.

Use Automatic URL-Change Detection

WordPress websites can contain a large amount of content, making manual redirect management difficult when URLs change frequently.

Smart Redirects Pro can detect relevant URL changes and create appropriate redirects automatically.

This can reduce the maintenance required when published content is moved.

Automatic redirects can also be created when content is deleted, providing administrators with greater control over what happens to URLs that previously pointed towards published content.

Redirect URLs During a Website Migration

Website migrations often involve hundreds or thousands of URL changes.

A migration might involve:

  • Changing domains
  • Changing permalink structures
  • Moving content
  • Restructuring categories
  • Replacing old pages
  • Moving products
  • Changing URL folders
  • Consolidating duplicate content

A migration redirect plan should map important old URLs to their appropriate new destinations.

Smart Redirects Pro can support this process with redirect groups, bulk management, CSV and JSON import and export, scheduling, 404 monitoring and analytics.

Redirect groups can also be used to organise rules by migration, website section, campaign or project.

Test Redirects After Making Changes

A redirect should not simply be created and forgotten.

Test important redirects after implementation to confirm that:

  1. The old URL is recognised correctly.
  2. The redirect status is correct.
  3. The visitor reaches the intended destination.
  4. The destination loads successfully.
  5. There is no redirect loop.
  6. The redirect does not create an unnecessary chain.
  7. Important query parameters behave as expected.

Smart Redirects Pro includes a Redirect Health Check that can test active destination URLs for obvious HTTP failures.

Checks are performed when requested rather than continuously in the background.

Use the Correct Redirect for Removed Content

Not every deleted URL should point to another page.

If content has moved, redirect it to the relevant replacement.

If content has been permanently removed and there is no suitable replacement, a 410 response may be appropriate.

Avoid redirecting large numbers of unrelated old URLs to your homepage simply because the original content no longer exists. A redirect should provide a meaningful destination for the requested URL.

Manage Redirects From One WordPress Dashboard

As a website grows, redirect management can become a significant maintenance task.

A centralised system makes it easier to:

  • Search redirect rules
  • Filter redirects
  • Group related rules
  • Enable or disable rules
  • Edit destinations
  • Monitor redirect usage
  • Identify 404 problems
  • Import redirect configurations
  • Export redirect configurations
  • Test destinations
  • Review URL changes

WPCodeForge Smart Redirects Pro brings these functions together inside WordPress.

It supports exact URLs, URL prefixes and regular expressions, along with permanent and temporary redirects, 410 and 451 responses, scheduling, query-parameter controls and other routing options.

How Smart Redirects Pro Helps With WordPress URL Management

WPCodeForge Smart Redirects Pro is designed for websites that need more control over URL changes than basic redirect functionality provides.

The plugin combines redirect creation with tools for discovering and monitoring URL problems.

Key features include:

  • Create and manage redirects from WordPress
  • 301, 302, 307 and 308 redirects
  • 410 Gone and 451 responses
  • Exact URL matching
  • Prefix matching
  • Regular expression matching
  • Redirect groups
  • Automatic URL-change detection
  • Intelligent 404 recovery
  • 404 monitoring
  • Redirect analytics
  • Internal link scanning
  • Redirect health checks
  • Query-string controls
  • Tracking-parameter handling
  • Redirect scheduling
  • Bulk redirect management
  • CSV import and export
  • JSON import and export
  • Security-focused 404 monitoring
  • Configurable log retention
  • 404 email notifications
  • REST API access
  • WP-CLI support
  • WordPress Multisite support
  • Developer diagnostics

The result is a central WordPress-based workflow for creating, testing, monitoring and maintaining redirects.

WordPress Redirects and SEO

Redirects are an important part of technical SEO when website URLs change.

A correctly configured permanent redirect can help search engines understand that an old URL has moved to a new location.

However, redirects should be relevant and intentional. Creating unnecessary redirects, redirect chains or broad rules can make a website more difficult to maintain.

When changing URLs, consider the complete path from the old address to the final destination.

See also  How to Find Broken URLs in WordPress

A practical approach is to:

  1. Identify the old URL.
  2. Identify the most relevant replacement.
  3. Create the appropriate redirect.
  4. Test the redirect.
  5. Update internal links where possible.
  6. Monitor 404 activity.
  7. Review redirect performance over time.

This creates a more controlled approach to URL management.

A Practical WordPress Redirect Checklist

Before publishing a redirect, check the following:

  • Is the old URL genuinely being replaced?
  • Is there a relevant new destination?
  • Should the redirect be permanent or temporary?
  • Is a 301 redirect appropriate?
  • Could a 410 response be more suitable?
  • Does the destination load correctly?
  • Does the rule create a redirect loop?
  • Does the old URL already redirect somewhere else?
  • Could the rule create a redirect chain?
  • Should query parameters be preserved?
  • Are internal links pointing to the old URL?
  • Should the redirect be grouped with related rules?
  • Has the redirect been tested?
  • Does the old URL continue to receive requests?
  • Should the rule be reviewed later?

Following this process can help keep redirect configurations organised as your WordPress website develops.

Frequently Asked Questions

How do I redirect a URL in WordPress?

You can redirect a URL using a WordPress redirect plugin, server configuration or another redirect-management method. With WPCodeForge Smart Redirects Pro, you can create and manage redirects directly from the WordPress dashboard without manually editing .htaccess files.

How do I redirect an old URL to a new URL?

Create a redirect with the old URL as the source and the new URL as the destination. If the page has permanently moved, a 301 redirect is commonly used.

Is a 301 redirect better for permanent URL changes?

A 301 redirect is specifically intended to indicate that a URL has permanently moved. It is commonly used when replacing an old page with a new URL.

Can I redirect URLs without editing .htaccess?

Yes. A WordPress redirect plugin can provide a dashboard-based method for creating redirects without requiring manual .htaccess editing. Smart Redirects Pro is designed specifically for managing redirects from within WordPress.

Can redirects prevent 404 errors?

Redirects can prevent certain 404 errors when an old URL has a relevant replacement. However, not every missing URL should be redirected. URLs without a suitable replacement may be better handled as genuine 404 or 410 responses.

Yes. Redirects can be created from old URLs to their corresponding new URLs after changing a permalink structure. Prefix and regular expression matching can also be useful for larger structural changes.

Can I redirect multiple WordPress URLs?

Yes. Multiple redirect rules can be created and managed. Smart Redirects Pro also provides redirect groups, bulk management and import tools for websites with larger numbers of redirects.

Can Smart Redirects Pro find broken URLs?

Yes. Smart Redirects Pro includes a 404 Monitor for recording broken URL requests and an Internal Link Scanner for identifying internal links that point towards missing URLs.

Can Smart Redirects Pro automatically detect URL changes?

Yes. The plugin includes automatic URL-change detection that can create appropriate redirects when relevant WordPress content URLs change.

Does Smart Redirects Pro support temporary redirects?

Yes. Smart Redirects Pro supports 302 and 307 temporary redirects, as well as 301 and 308 permanent redirects.

Can I redirect an old URL to an external website?

Yes. Redirect destinations can point to external URLs as well as destinations within the same WordPress website.

Does Smart Redirects Pro support website migrations?

Yes. The plugin is designed to support URL migrations with redirect groups, exact and pattern-based rules, import and export tools, scheduling, 404 monitoring, analytics and redirect diagnostics.

Can I monitor redirects after creating them?

Yes. Smart Redirects Pro provides analytics showing redirect activity, hit counts, last-hit information and other redirect-related data.

Do I need coding knowledge to use Smart Redirects Pro?

No advanced coding knowledge is required for normal redirect management. Redirects can be created and managed through the WordPress administration interface.

Take Control of Your WordPress Redirects

URL changes are a normal part of managing a WordPress website, but outdated URLs do not need to become a permanent source of broken links and 404 errors.

A structured redirect strategy can help visitors reach the right content, support cleaner website maintenance and provide better control over URL changes.

WPCodeForge Smart Redirects Pro provides a centralised system for creating and managing redirects while adding tools for 404 recovery, URL-change detection, internal link scanning, analytics, health checks and migration management.

Whether you need to redirect a single old page or manage thousands of URLs during a website migration, Smart Redirects Pro provides the controls needed to manage WordPress redirects from one place.

Scroll to Top