Import & Export Redirects
Bulk manage redirects using CSV files for easy migration and backup
Overview
The Import/Export feature allows you to manage redirects in bulk using CSV (Comma-Separated Values) files. This is perfect for migrating redirects between sites, creating backups, or managing large redirect lists in spreadsheet applications like Excel or Google Sheets.
Key Benefits
- Backup all redirects before major changes
- Migrate redirects between sites
- Bulk create hundreds of redirects
- Edit redirects in spreadsheet software
- Share redirect lists with team members
- Version control redirect configurations
CSV File Format
Required CSV Structure
The CSV file must include these columns in the exact order:
| Column | Name | Required | Description | Example |
|---|---|---|---|---|
| 1 | source_url | Yes | URL to redirect from | /old-page |
| 2 | target_url | Yes | URL to redirect to | /new-page |
| 3 | type | Yes | HTTP status code | 301 |
| 4 | is_regex | No | Regex pattern (Pro+) | 0 or 1 |
| 5 | status | No | Active or inactive | active |
| 6 | priority | No | Processing order | 0 |
| 7 | notes | No | Description/notes | Migration 2024 |
Example CSV Files
Basic Redirects
source_url,target_url,type,is_regex,status,priority,notes
/old-home,/,301,0,active,0,Homepage redirect
/about-us,/about,301,0,active,0,Simplified URL
/blog/old-post,/blog/new-post,301,0,active,0,Updated post URL
/products,/shop,302,0,active,0,Temporary redirect
/contact.html,/contact,301,0,active,0,Remove .html extensionRegex Patterns (Pro+)
source_url,target_url,type,is_regex,status,priority,notes
^/old-category/(.*)$,/new-category/$1,301,1,active,100,Category migration
^/[0-9]{4}/[0-9]{2}/(.*)$,/blog/$1,301,1,active,90,Date-based to flat URLs
^(.*).html$,$1,301,1,active,80,Remove all .html extensions
^/tag/(.*)$,/topic/$1,301,1,active,70,Tag to topic renameMixed Types
source_url,target_url,type,is_regex,status,priority,notes
/summer-sale,/products,302,0,active,999,High priority seasonal
/wp-admin,/login,301,0,active,0,Custom login page
^/author/(.*)$,/team/$1,301,1,active,50,Author pages moved
/old-file.pdf,https://cdn.example.com/file.pdf,301,0,active,0,Moved to CDN
/beta,/,302,0,inactive,0,Beta site redirect (disabled)Exporting Redirects
Export Process
- Navigate to Redirect ManagerGo to ProRank SEO → Technical SEO → Redirect Manager
- Apply Filters (Optional)Filter redirects if you only want to export specific ones
- Click "Export CSV"Located in the toolbar above the redirect list
- Choose Export OptionsAll redirectsFiltered redirects onlySelected redirects
- Download FileFile will be named:
redirects-export-YYYY-MM-DD.csv
Export includes hit statistics and timestamps for analysis in spreadsheet software.
Importing Redirects
Import Process
- Prepare Your CSV FileEnsure it follows the required format shown above
- Click "Import CSV"Located in the Redirect Manager toolbar
- Select Import ModeAppend:
Add new redirects, skip existing source URLs
Update:Update existing redirects, add new ones
Replace:Delete all existing, import new (dangerous!)
- Upload FileClick "Choose File" and select your CSV
- Review PreviewCheck the preview of redirects to be imported
- Confirm ImportClick "Import Redirects" to complete the process
Validation & Error Handling
Common Import Errors
Missing required columns or wrong order
Solution: Download sample CSV and match format exactly
Source or target URLs are malformed
Solution: Ensure URLs start with / or http://
Type must be 301, 302, 307, or 308
Solution: Check type column for valid values
Invalid regular expression pattern
Solution: Test regex patterns before import
Same source URL appears multiple times
Solution: Remove duplicates or use Update mode
Validation Rules
- • Source URLs must be unique (no duplicates)
- • URLs should not create redirect loops
- • Regex patterns must compile without errors
- • Priority must be 0-999
- • Status must be "active" or "inactive"
- • File size limit: 5MB
- • Maximum rows: 10,000 (configurable)
Best Practices
Do's
- ✓ Export backup before major imports
- ✓ Test imports on staging first
- ✓ Use UTF-8 encoding for CSV files
- ✓ Validate URLs before import
- ✓ Use notes field for documentation
- ✓ Check for redirect chains after import
Don'ts
- ✗ Don't use Replace mode without backup
- ✗ Don't import untested regex patterns
- ✗ Don't exceed 10,000 redirects at once
- ✗ Don't include sensitive data in notes
- ✗ Don't import redirects to 404 pages
- ✗ Don't skip validation warnings
Advanced Tips
Spreadsheet Formulas
Use Excel/Google Sheets formulas to generate redirects:
# Remove .html from all URLs
=CONCATENATE(A2,",",SUBSTITUTE(A2,".html",""),",301,0,active,0,Remove HTML")
# Add www to all URLs
=CONCATENATE(A2,",","https://www.",MID(A2,9,LEN(A2)),",301,0,active,0,Add www")
# Create blog redirects
=CONCATENATE("/blog/",A2,",/articles/",A2,",301,0,active,0,Blog migration")Batch Processing
For large redirect lists:
- • Split into multiple CSV files (1000 rows each)
- • Import during low-traffic periods
- • Use priority to control processing order
- • Monitor server resources during import
Troubleshooting
Character Encoding: Always save CSV files as UTF-8 to prevent issues with special characters. In Excel, use "Save As" → "CSV UTF-8".
Large Files: For files over 5MB, consider using database import or WP-CLI commands instead of the web interface.