Overview
The Redirects Manager provides a simple interface to create and manage URL redirects without touching server configuration files. Supports 301 permanent and 302 temporary redirects with wildcard pattern matching.Proper redirects preserve SEO value when moving or restructuring content, preventing 404 errors and maintaining link equity.
Features
301 & 302 Redirects
Permanent (301) or temporary (302) redirect types
Wildcard Support
Pattern matching with
* for flexible redirectsSimple Management
Add, edit, and remove redirects from WordPress admin
Fast Execution
Runs early in WordPress loading for minimal overhead
Redirect Types
301 Permanent Redirect
301 Permanent Redirect
Use when: Content has permanently moved to a new URLSEO Impact:
- Passes 90-99% of link equity to new URL
- Tells search engines to update their index
- Should be used for permanent changes
- Site restructure:
/old-section/*→/new-section/ - Page rename:
/contact-us→/contact - Domain change: All pages to new domain
302 Temporary Redirect
302 Temporary Redirect
Use when: Content is temporarily at a different URLSEO Impact:
- Does NOT pass link equity
- Tells search engines the change is temporary
- Original URL stays in index
- A/B testing different landing pages
- Seasonal promotions
- Maintenance pages
- Limited-time campaigns
Configuration
Implementation Details
Redirects Class
includes/class-geoai-redirects.php
Pattern Matching
includes/class-geoai-redirects.php
Wildcard Patterns
Use* to match any characters:
Redirect Examples
Single Page Redirect
| From URL | To URL | Type | Use Case |
|---|---|---|---|
/old-contact | /contact | 301 | Page renamed |
/about-us | /about | 301 | URL simplified |
/sale | /black-friday | 302 | Temporary promo |
Bulk Directory Redirects
| From URL | To URL | Type | Use Case |
|---|---|---|---|
/blog/* | /articles/ | 301 | Section renamed |
/products/* | https://shop.example.com/ | 301 | Moved to subdomain |
/old-site/* | / | 301 | Site restructure |
Protocol Redirects
For HTTPS redirects, use server-level redirects (htaccess, nginx config) for better performance.
External Redirects
| From URL | To URL | Type | Use Case |
|---|---|---|---|
/facebook | https://facebook.com/yourpage | 301 | Social shortlink |
/youtube | https://youtube.com/c/yourchannel | 301 | Channel shortlink |
/docs | https://docs.example.com | 301 | External docs site |
Admin Interface
The redirects table allows inline editing:includes/class-geoai-admin.php
Best Practices
Use 301 for Permanent Changes
Always use 301 redirects when content has permanently moved. This passes SEO value.
Avoid Redirect Chains
Don’t redirect A → B → C. Always redirect directly to the final destination.
Test After Creation
Visit the old URL to verify the redirect works and points to the correct destination.
Update Internal Links
Update links in your content rather than relying on redirects indefinitely.
Monitor 404 Errors
Use the 404 Monitor to identify pages that need redirects.
Document Major Redirects
Keep a record of important redirects, especially during site migrations.
Redirect Chains
Bad:Performance Considerations
Early Execution
Redirects run at priority 1 on
template_redirect, before most WordPress processing.Minimal Overhead
Simple array lookup and regex matching. Typically less than 1ms per request.
No Database Queries
Redirects stored in options cache, no additional DB hits.
Exit Early
PHP execution stops immediately after redirect, saving resources.
Server-Level Alternatives
For very high-traffic sites, consider server-level redirects:- Apache (.htaccess)
- Nginx
.htaccess
Migration Workflow
When migrating or restructuring a site:Programmatic Management
Manage redirects via code:Bulk Import
Troubleshooting
Redirect not working
Redirect not working
Check:
- From URL matches exactly (case-sensitive)
- Include leading slash:
/pagenotpage - Redirect is saved (click Save Changes)
- Clear browser cache
- Test in incognito mode
Redirect loop
Redirect loop
Cause: Circular redirect (A → B → A)Solution:
- Check both GEO AI and other redirect sources
- Verify destination URL is correct
- Remove conflicting redirects
Wildcard not matching
Wildcard not matching
Common issues:
- Pattern must match full path:
/blog/*notblog/* - Use
*not%or other wildcards - Test pattern with specific examples
Too many redirects error
Too many redirects error
Cause: Redirect chain or loopSolution:
- Remove intermediate redirects
- Redirect directly to final destination
- Check server-level redirects (htaccess, nginx)
SEO Impact
Link Equity Transfer
| Redirect Type | Link Equity Passed | Indexing Behavior |
|---|---|---|
| 301 Permanent | ~90-99% | New URL indexed, old URL removed |
| 302 Temporary | 0% (minimal) | Old URL stays indexed |
| 307 Temporary | 0% (minimal) | Old URL stays indexed |
Time to Re-index
After creating 301 redirects:- Google discovers redirect: 1-7 days
- Link equity transfers: 2-4 weeks
- Old URL drops from index: 4-8 weeks
Related Features
404 Monitor
Track broken links needing redirects
Sitemaps
Update sitemaps after redirects
Meta Tags
Canonical URLs for duplicate content