Bulk 301 Redirect Generator — Guide
Generate bulk redirects for Apache, Nginx, Cloudflare, Netlify and Vercel. Import CSV, detect loops and chains, and export server-ready rules locally.
What it is and when to use it
A redirect map connects an old URL to the page that replaces it. It is commonly used during site redesigns, URL restructuring, content consolidation and domain migrations. This tool turns a batch of source and destination pairs into exact-path rules for Apache mod_alias, Nginx, Cloudflare Bulk Redirect CSV, Netlify _redirects or Vercel vercel.json. Before export it checks the submitted mappings for malformed URLs, duplicate sources, self-redirects, loops and avoidable chains. All parsing and generation run in the browser; your mapping list is not uploaded.
Map old URLs to replacement destinations and generate bulk redirects for Apache, Nginx, Cloudflare, Netlify or Vercel. The validator checks your submitted mapping list before export.
How to use it
- Paste a two-column CSV or tab-separated list with the old URL first and the destination second. You can also enter one old URL -> new URL pair per line, or import a CSV/TSV file.
- Choose the response status. Use 301 or 308 for a permanent move, and 302 or 307 for a temporary redirect.
- Choose Apache .htaccess, an Nginx server block, Cloudflare Bulk Redirect CSV, Netlify _redirects or Vercel vercel.json. Cloudflare requires a site origin when your mappings use relative paths.
- For Cloudflare, choose whether to include subdomains, match paths below each source and preserve the unmatched path suffix. Preserving the suffix requires subpath matching.
- Review duplicate sources, invalid paths, self-redirects, loops and redirect-chain warnings. Fix rows marked as errors before exporting.
- Copy the generated rules or download the file, then test the configuration on a staging host before deploying it.
Choose a redirect format that matches your host
Apache mod_alias and Nginx server blocks produce exact-path server rules. Cloudflare Bulk Redirect CSV is a seven-column import format with explicit host and path matching options. Netlify uses a plain-text _redirects file and supports 301 or 302 in that format. Vercel reads a redirects array from vercel.json, where each entry has a source, destination and statusCode. These formats are not interchangeable: place the output in the correct project or server configuration location and verify how your host handles existing files and routes.
Configure Cloudflare matching without broadening rules by accident
Include subdomains expands the hostnames that a source mapping can match. Subpath matching also catches requests below the source path. Preserve path suffix forwards the remaining unmatched path segments to the destination, and only applies when subpath matching is enabled. Keep these options disabled unless the migration plan intentionally needs the broader match; test representative URLs before importing a large list.
Avoid redirect chains during a site migration
Point each old URL directly to its final destination rather than sending visitors through several intermediate URLs. Update internal links, canonical references and XML sitemaps to use the destination URL instead of relying on redirects forever. A generated mapping list can reveal chains and loops inside the rows you submit, but it cannot discover rules that live in a CDN, application router or another server configuration.
Build a complete source-to-destination inventory
Export the URLs that are actually receiving traffic or links before changing the site structure. Group them by page purpose, locale, product or content category, then assign one relevant final destination to every source that should remain useful. Separate removed pages with no replacement from pages that have moved, because a redirect is not always the right response for permanently retired content. Resolve duplicate source paths and conflicting destinations before generating production rules.
Choose a destination that preserves the original intent
A redirect should take a visitor to the page that best replaces the old resource, not simply to the nearest category or the home page. Google Search Central warns that redirecting many unrelated URLs to one page can confuse users and may be treated as a soft 404. When several pages have genuinely been consolidated into one useful resource, a shared destination can be appropriate. Review the destination content and its status code before approving each mapping.
Select status codes with HTTP method behavior in mind
Use a permanent status such as 301 or 308 when the resource has moved for good, and a temporary status such as 302 or 307 when the original location may return. The 307 and 308 codes explicitly preserve the request method, while user agents may change a POST request to GET after a 301 or 302 response. For endpoints that accept form submissions or other non-GET requests, choose the method-preserving code deliberately and test the behavior with the actual client. Do not use a permanent redirect as a temporary experiment because browsers and intermediaries may cache it.
Review host matching, path suffixes and query strings
A rule that matches a whole host or a broad path can affect more URLs than the migration team intended. Start with exact source paths, then enable subdomain or subpath matching only when the source inventory requires it. Decide explicitly whether query parameters should be carried to the destination; campaign tags, search filters and application parameters can have different requirements. When preserving a path suffix, verify several nested examples so that the appended destination path is correct rather than duplicated.
Test a representative migration matrix before rollout
Test more than the single example shown in the generator. Include the canonical host, alternate hostnames, HTTP and HTTPS variants, trailing-slash variants, nested paths, query strings, and every status code used by the mapping. Check both the response status and the Location header, then follow the chain to confirm that the final page returns the expected content. Test method-preserving redirects with a non-GET request in a staging environment before switching production traffic.
Update canonical URLs, internal links and sitemaps
After the redirects are active, make the destination page self-canonical and update internal links so visitors do not need to pass through an old URL. Refresh hreflang references when localized pages move, and make the XML sitemap list the new canonical URLs rather than redirecting source URLs. Submit the updated sitemap in Search Console and inspect representative source and destination URLs for indexing or crawl errors. These steps help search engines discover the new locations instead of depending on redirects as the only discovery path.
Monitor the migration and retain redirects
Keep a dated copy of the source mapping and the deployed configuration so unexpected changes can be traced or rolled back. After launch, monitor server logs, analytics landing pages, Search Console coverage and destination errors for old URLs that still receive meaningful visits. Fix redirect loops, unexpected 404 responses and destinations that have become irrelevant as soon as they appear. Google Search Central recommends keeping redirects in place for as long as possible and generally for at least one year after a site move.
A worked example
Load a redirect mapping sample
Source URL,Target URL /old-product,https://example.com/products/new-product /legacy-guide,/guides/current-guide /sale,/offers
Copy this into the tool, or open Bulk 301 Redirect Generator
Things that trip people up
- The analyzer only checks mappings you provide. It does not send requests, verify that destinations return HTTP 200, or inspect redirects already configured on your server.
- Chain detection is limited to paths in the current input. A destination that is redirected by a rule outside this list cannot be detected here.
- Cloudflare Bulk Redirect CSV has seven columns and no header row. Source URLs omit the scheme so a mapping can match both HTTP and HTTPS. Include-subdomains, subpath-matching and preserve-path-suffix are explicit options; preserving the suffix only applies when subpath matching is enabled.
- Netlify uses a plain-text _redirects file with one source, destination and status per line. Netlify documents 301 as the default and 302 as the temporary alternative, and explicitly notes that 307 is unsupported. This generator deliberately limits its Netlify export to 301 and 302; choose another format if you need 307 or 308. The downloaded text file must be renamed exactly to _redirects in the publish directory.
- Vercel output is a vercel.json redirects array with source, destination and statusCode fields. Preserve query parameters is included only when selected. Review exact paths and routing interactions in your project before deploying.
- Changing a permanent redirect after search engines and visitors have seen it can take time to be reflected. Keep mappings stable and avoid redirect chains where possible.
Questions people ask
- What input formats does the redirect generator accept?
- Paste comma-separated CSV, tab-separated pairs or one “old URL -> new URL” mapping per line. You can also import a CSV or TSV file. CSV headers such as Source URL and Target URL are recognized.
- Which platforms and output formats are supported?
- The generator exports Apache .htaccess RedirectMatch rules, Nginx exact-match locations, seven-column Cloudflare Bulk Redirect CSV, Netlify _redirects lines and a Vercel vercel.json redirects array.
- Which status code should I choose: 301, 302, 307 or 308?
- Choose 301 or 308 for a permanent move and 302 or 307 for a temporary one. The 307 and 308 codes preserve the request method; use them when that distinction matters to your application. This generator limits Netlify _redirects output to 301 and 302; choose Apache, Nginx, Cloudflare or Vercel output when you need 307 or 308.
- How do the Cloudflare subdomain and path options work?
- Include subdomains lets a source mapping match subdomains. Subpath matching also matches URLs below the source path. Preserve path suffix forwards the remaining path segments to the destination and requires subpath matching. Keep broader matching disabled unless the migration requires it.
- Does the tool check whether the new URL exists?
- No. It validates URL syntax and relationships within the mapping list, but it does not make network requests or confirm that a destination responds successfully. Check target URLs separately before deployment.
- How are redirect loops and chains detected?
- The analyzer follows path-to-path mappings included in the current batch. It marks loops as errors and warns when one submitted destination continues through another submitted redirect. Rules outside the pasted list are not visible to the analyzer.
- Does generating a 301 redirect guarantee better rankings?
- No. A 301 is a technical migration signal, not a ranking guarantee. Use it when a page has permanently moved, point to the most relevant final destination and update internal links and sitemaps.
Next steps
Open the Bulk 301 Redirect Generator tool
- URL Encoder & Decoder
- URL Parser
- Outlook Safe Links Batch Decoder
- URL Slug Generator
- HTML Entity Encoder & Decoder
- Device information
Spotted something wrong on this page? Tell us via Contact Us