Bulk Domain Redirects: How to Import Hundreds at Once

Michel BardelmeijerMichel Bardelmeijer

Michel Bardelmeijer is Tech Lead and Sales at redirect.pizza, where he helps DevOps and IT teams solve domain redirect challenges at scale. Michel has guided organizations like SD Worx, Zurich Airport and Harvard through complex redirect scenarios involving thousands of domains.

Have questions about bulk redirects, HTTPS migrations, or domain consolidations? Connect with Michel on LinkedIn or reach out to the redirect.pizza team.

You're migrating 200 domains after an acquisition. Setting them up one by one would take hours and inevitably introduce typos. CSV import takes minutes. But one wrong column format or a missing protocol can break production traffic for thousands of users.

For redirect fundamentals and HTTPS configuration, see our Complete Guide to URL Redirects.

Key Takeaways

  • CSV import eliminates manual setup errors for 10+ domains - use format: source (no protocol), target (full URL), status_code, notes
  • Always validate your CSV before importing: check for duplicate sources, missing protocols, and hidden characters from copy-paste
  • Use progressive rollout: start with low-traffic domains, monitor 24-48 hours, then scale up
  • Test destination URLs respond with 200 before importing - a redirect to a 404 is worse than no redirect
  • Export existing configuration as backup before importing - most services overwrite matching source domains

Bulk Domain Redirects: How to Import Hundreds at OnceWhen Bulk Import Makes Sense

Bulk import is the right approach when you're dealing with volume and consistency. If you have many domains that all need similar redirect configurations, CSV import eliminates repetitive manual work and reduces human error.

Good candidates for bulk import include brand consolidation projects where dozens of legacy domains all redirect to a single destination. M&A integrations work well too, where acquired company domains need to point to your main site. The same applies to legacy domain cleanup when you've accumulated domains over the years, and multi-region consolidation when country-specific domains are merging into a single international site.

Individual setup makes more sense when you have fewer than ten domains (the time savings don't justify the setup), when each domain needs completely different redirect logic, or when you need a mix of permanent and temporary redirects with different path handling rules. For 10-50 domains, either approach works; choose based on how consistent your redirect rules are. For guidance on choosing redirect types, see 301 vs 302: Which Should You Use?

CSV Format Specification

The exact CSV format varies by redirect service, but most follow a similar pattern. Here's a standard format that works with most platforms:

source,target,status_code,notes
olddomain.com,https://newdomain.com,301,Main brand redirect
legacy.com,https://newdomain.com/legacy,301,Acquired 2024
promo2023.com,https://newdomain.com/archive,301,Campaign cleanup

Column definitions

source (required): The domain being redirected. Do not include the protocol (no https://). Just the bare domain: olddomain.com or www.olddomain.com.

target (required): The destination URL. Include the full URL with protocol: https://newdomain.com or https://newdomain.com/specific-page. This is where users will land after the redirect.

status_code (usually optional): Either 301 (permanent) or 302 (temporary). Most services default to 301 if not specified. Use 301 for domain migrations and consolidations. Use 302 only for genuinely temporary situations.

notes (optional): A description for your own reference. Helpful when reviewing redirects months later and trying to remember why a particular redirect exists.

Common format mistakes

Protocol in the source column. If you enter https://olddomain.com instead of olddomain.com, most services will reject the row or create a malformed redirect.

Missing protocol in target. If you enter newdomain.com instead of https://newdomain.com, the redirect may fail or send users to an HTTP URL when they expect HTTPS. For HTTPS redirect configuration, see How to Redirect with HTTPS.

Excel adding quotes. When you edit CSV files in Excel and save them, Excel sometimes wraps values in quotes or changes formatting. Open the file in a plain text editor before import to verify.

Hidden characters from copy-paste. Copying domains from websites, emails, or documents can introduce invisible characters (zero-width spaces, smart quotes, non-breaking spaces). These cause validation errors that are hard to debug because the data looks correct.

Trailing whitespace. A space after a domain name (olddomain.com ) will cause the redirect to fail because the service tries to match the domain literally, including the space.

Validation Before Import

Never import directly to production. Validate your CSV file first to catch problems before they affect real traffic.

Format validation

Before uploading, check the basics:

Verify column count matches what the service expects. If your service wants four columns but you only have three, the import will fail or misinterpret your data.

Check for empty rows. Blank lines in the middle of your CSV can cause parsers to stop early or create empty redirect rules.

Confirm no duplicate sources. If the same source domain appears twice with different destinations, behavior is undefined. Most services will use the last one, but you probably didn't intend to have duplicates.

Open the file in a plain text editor (not Excel) and look for obvious problems: missing commas, inconsistent quoting, strange characters.

Domain validation

Beyond format, verify the actual domains:

Confirm you control all source domains. Importing a redirect for a domain you don't own won't work (you can't point DNS for domains you don't control), but it might indicate a data error in your CSV.

Test that destination URLs actually respond. A redirect to a 404 page is worse than no redirect at all. Spot-check a sample of destination URLs, or script a check:

# Extract destinations and check each one
tail -n +2 redirects.csv | while IFS=',' read -r source target status notes; do
  code=$(curl -s -o /dev/null -w "%{http_code}" "$target")
  if [ "$code" != "200" ]; then
    echo "WARNING: $target returned $code"
  fi
done

Note: this script assumes no commas in your notes column. If your notes contain commas, either remove them before running or use a proper CSV parser.

Check for circular references. If your CSV contains both a.com redirecting to b.com and b.com redirecting to a.com, you've created an infinite loop. Search for any domain that appears in both source and target columns.

Test in staging first

If your redirect service offers a staging or test environment, import there first. Test a sample of redirects manually: visit the source domain and verify you land on the correct destination with the correct status code.

If there's no staging environment, consider importing a small batch (5-10 domains) to production first, verifying they work correctly, then importing the rest.

Progressive Rollout Strategy

For large imports (50+ domains), don't import everything at once. A phased approach limits the blast radius if something goes wrong.

Phase 1: Low-traffic domains first

Start with domains that receive the least traffic. These are often legacy domains or old campaign URLs that get occasional visits but aren't business-critical.

Import the first 10-20% of your list. Monitor for 24-48 hours. Check that redirects are working, that there are no certificate errors, and that hit counts look reasonable.

Phase 2: Medium-traffic domains

Once phase 1 is stable, import the next batch. This might be 30-40% of your total list. Continue monitoring.

At this stage, you should also check the destination site's analytics. Are you seeing increased traffic from the redirected domains? If redirects are working but traffic isn't appearing, something may be wrong with your analytics setup.

Phase 3: High-traffic domains

The final batch includes your most important domains. By now, you've validated that your CSV format is correct, your process works, and monitoring is in place.

After importing, document baseline metrics: typical hit counts per domain, error rates, and traffic patterns. You'll need these baselines to detect problems later.

Rollback procedure

Before you start, know how to undo. Export your current redirect configuration (if any) before importing new ones. If imports overwrite existing redirects, you'll want that backup.

If a redirect is causing problems, most services let you delete individual rules. For a complete rollback, you may need to restore DNS to its previous configuration and delete the redirect rules. For DNS-level redirect fundamentals, see our complete redirect guide.

Common Bulk Import Errors

When imports fail, the error messages aren't always clear. Here's what common errors usually mean:

  • Invalid source domain typically means you included the protocol. Remove https:// from the source column.
  • Invalid destination URL usually means you're missing the protocol. Add https:// to the target column.
  • Duplicate source means the same domain appears multiple times in your CSV. Find and remove duplicates, keeping only the correct mapping.
  • Circular redirect detected means domain A points to domain B, and somewhere (maybe in this import, maybe in existing rules) domain B points back to A. Identify and fix the loop.
  • Row parsing error often means inconsistent column counts. Check that every row has the same number of commas. A missing comma or an extra comma throws off the parser.

Frequently Asked Questions

This varies by service. Most enterprise redirect services handle thousands of redirects per import without issues. For very large imports (100,000+), you may need to batch them for performance, or the service may process them asynchronously and notify you when complete.

Usually yes, if the source domain matches an existing redirect. The new rule replaces the old one. Always export your current configuration as a backup before importing.

Yes, most services offer CSV export. This enables managing redirect configurations in Git, tracking changes over time, and reviewing who changed what and when. Treat your redirect CSV like infrastructure-as-code.

For managing many domains without server infrastructure, DNS-level redirects are simpler. They handle SSL certificates automatically and don't require hosting for each source domain. See DNS-Level vs Server-Side Redirects for a detailed comparison.

redirect.pizza supports CSV bulk import for managing large domain portfolios. Import hundreds of redirects with automatic SSL certificate provisioning for each domain. View enterprise features or get started free with up to 5 domains.

Pricing Background
Domain redirects delivered hassle-free

Get started right away

  • Free plan
  • No creditcard required
Serving millions of redirects for
Warner Bros.
Harvard
CalTech
Red Bull
Zurich Airport
Nando's
Kneipp
Culture Gouv FR
SD Worx
Visma
team.blue
ElevenLabs
Ascension
Norlys
Concept2
Teamleader
Chargify
JBS SA
Wunderman Thompson
Lerner Publishing Group
RGF Staffing
Apollo
IU
Chabad