301 Redirect Mapper
Plan and generate 301 redirect mappings for site migrations and URL changes. Enter values for instant results with step-by-step formulas.
Reviewed for accuracy by Daniel Agrici, Founder & Lead Developer
301 Redirect Mapper
Calculator
Adjust values & calculateEnter your values below. Every result is computed in your browser โ no data is sent to any server.
Formula: Redirect 301 /old-path https://domain.com/new-path
Worked example โ 3 redirect rules generated | 0 errors | 0 warnings
Formula
Redirect 301 /old-path https://domain.com/new-path
A 301 redirect permanently maps an old URL to a new one. The server responds with HTTP status 301, passing approximately 90-99% of link equity to the destination URL. This tool validates mappings and generates server-specific redirect rules.
Worked Examples
Example 1: Blog URL Restructure
Problem:A website is restructuring its blog URLs from /blog/2023/01/my-post to /blog/my-post. Generate the .htaccess redirect for 3 posts.
Solution:Redirect 301 /blog/2023/01/seo-guide https://example.com/blog/seo-guide Redirect 301 /blog/2023/02/content-tips https://example.com/blog/content-tips Redirect 301 /blog/2023/03/link-building https://example.com/blog/link-building All redirects are direct (no chains) and use absolute destination URLs.
Result:3 redirect rules generated | 0 errors | 0 warnings
Example 2: Domain Migration with Service Pages
Problem:Migrating from oldsite.com to newsite.com. Map /services/web-design to /solutions/web-design, /services/seo to /solutions/seo-services, /about to /company/about-us.
Solution:Redirect 301 /services/web-design https://newsite.com/solutions/web-design Redirect 301 /services/seo https://newsite.com/solutions/seo-services Redirect 301 /about https://newsite.com/company/about-us Each old URL maps directly to the most relevant new page. No chains detected.
Result:3 redirect rules | Direct mapping | Full link equity preserved
Frequently Asked Questions
What is a 301 redirect and when should I use one?
A 301 redirect is a permanent server-side redirect that tells both browsers and search engines that a page has permanently moved to a new location. It automatically sends visitors and search engine crawlers to the new URL. You should use 301 redirects during site migrations, when restructuring your URL architecture, after deleting or merging pages, when changing domain names, or when consolidating duplicate content. The 301 status code signals to search engines that approximately ninety to ninety-nine percent of the original page's link equity should transfer to the new URL. This makes it crucial for maintaining your search rankings during any URL changes. Without proper 301 redirects, you risk losing organic traffic and accumulated SEO authority.
What is the difference between a 301 and 302 redirect?
A 301 redirect indicates a permanent move, while a 302 redirect indicates a temporary move. With a 301, search engines transfer the link equity and ranking signals to the new URL and eventually remove the old URL from their index. With a 302, search engines keep the old URL indexed because they expect the page to return to its original location. Using a 302 when you should use a 301 is a common mistake that can prevent link equity from passing to the new page, potentially hurting your rankings. Use 302 redirects only for genuinely temporary situations, such as A/B testing, maintenance pages, or geolocation-based redirects where the original URL will be used again in the future.
How do redirect chains affect SEO and performance?
Redirect chains occur when one redirect points to another redirect, creating a sequence like A redirects to B, and B redirects to C. These chains cause several problems for both SEO and user experience. Each redirect in the chain adds latency, typically fifty to five hundred milliseconds per hop, which slows down page load times. From an SEO perspective, Google has stated that they will follow up to five redirects in a chain but may lose link equity with each hop. Some studies suggest each redirect in a chain can cause a loss of about ten to fifteen percent of link equity. Best practice is to always redirect directly from the original URL to the final destination URL, eliminating intermediary hops entirely.
How long should I keep 301 redirects active?
The general recommendation is to keep 301 redirects active for at least one year, though many SEO experts advise keeping them indefinitely if possible. Google has stated that it takes time to fully process 301 redirects and consolidate ranking signals. After about one year, Google typically considers the migration complete and the old URLs should be fully deindexed. However, external links from other websites may still point to the old URLs for years after a migration, and removing the redirects would cause those links to return 404 errors, wasting valuable link equity. If server performance is a concern, you can audit and remove redirects for old URLs that no longer receive any traffic according to your server logs after twelve to twenty-four months.
What are best practices for planning a large-scale URL migration?
For large-scale migrations, start by crawling your entire existing site to create a complete URL inventory. Map each old URL to its most relevant new counterpart, prioritizing pages with the most traffic and backlinks. Test all redirects in a staging environment before going live, checking for loops, chains, and incorrect mappings. Implement redirects at the server level rather than using JavaScript or meta refresh redirects, as server-level redirects are fastest and pass the most link equity. After launch, monitor Google Search Console for crawl errors, track organic traffic daily, and check for soft 404 errors. Keep a backup of all redirect rules and have a rollback plan ready. Submit updated sitemaps and use the Change of Address tool in Search Console if changing domains.
What is the difference between Apache and Nginx redirect syntax?
Apache and Nginx use entirely different configuration syntax for redirects. Apache uses the mod_rewrite module with directives like Redirect 301 or RewriteRule placed in .htaccess files or the main server configuration. Nginx does not support .htaccess files and instead uses rewrite directives or return statements within server block configurations. An Apache redirect like Redirect 301 /old https://example.com/new translates to rewrite ^/old$ /new permanent in Nginx. Apache processes .htaccess on every request which adds overhead, while Nginx reads its config once at startup making it faster. When migrating between servers, you must manually convert all redirect rules to the correct syntax for the target platform.
How do I handle redirects for URL parameters and query strings?
URL parameters and query strings require special handling in redirect rules because they are not matched by default in most redirect directives. In Apache, a simple Redirect 301 directive ignores query strings by default and passes them through to the destination. To match or strip specific parameters, you need RewriteCond with the QUERY_STRING variable. In Nginx, the $args variable captures query strings, and you can use if conditions or map blocks for complex parameter-based routing. A common best practice is to redirect the base URL and let the parameters pass through naturally. If the new URL structure does not use the same parameters, explicitly strip them by appending a question mark at the end of the destination URL.
What tools can I use to validate my redirect mappings?
Several tools help validate redirect mappings before and after deployment. Screaming Frog SEO Spider can crawl your old URL list and verify each redirect returns the correct status code and destination. The curl command with the -I flag lets you check individual redirects from the command line. Httpstatus.io allows bulk checking of status codes for hundreds of URLs at once. Google Search Console reports crawl errors and redirect issues in the Coverage report. For pre-launch testing, browser developer tools Network tab shows redirect chains in real time. Ahrefs and Semrush can compare your old site crawl against the new one to identify missing redirects. Always test a representative sample including your highest-traffic pages immediately after deploying redirect rules.
What is a redirect loop and how do I fix it?
A redirect loop occurs when two or more redirects point to each other in a circular pattern, causing the browser to bounce endlessly between URLs until it displays an error. For example, if URL A redirects to URL B and URL B redirects back to URL A, the browser will attempt the redirect cycle multiple times before giving up with an ERR_TOO_MANY_REDIRECTS error. Common causes include conflicting rules in .htaccess, HTTP-to-HTTPS redirects conflicting with CMS-level redirects, and www-to-non-www rules that contradict other redirect rules. To fix loops, review all redirect sources including server config, CMS settings, CDN rules, and plugin configurations. Test each redirect individually using curl -I -L to trace the full redirect path and identify where the loop occurs.
Should I use regex patterns or individual redirect rules?
The choice between regex patterns and individual rules depends on the scale and consistency of your URL changes. Regex patterns are ideal when URLs follow a predictable structure, such as changing /blog/2023/post-name to /blog/post-name, where a single rule like RewriteRule ^blog/\d{4}/(.*)$ /blog/$1 handles thousands of URLs at once. Individual rules are better when mappings are one-to-one with no consistent pattern, such as restructuring an entire site where each page moves to a unique new location. For most migrations, a hybrid approach works best: use regex for bulk structural changes and individual rules for exceptions. Always test regex patterns thoroughly because an overly broad pattern can accidentally redirect pages that should not be affected.
References
Reviewed for accuracy by Daniel Agrici, Founder & Lead Developer ยท Editorial policy
Related Calculators
๐งฎMarketing ROI Calculator
Calculate marketing campaign return on investment from spend and revenue generated.
๐งฎContent Marketing ROI Calculator
Calculate the ROI of content marketing efforts from production costs and generated revenue.
๐งฎDomain Authority Checker
Check and compare domain authority scores for competitive SEO analysis.
๐งฎKeyword Density Checker
Analyze keyword density and frequency distribution in any webpage or text content.
๐งฎMeta Tag Length Checker
Verify that title tags and meta descriptions fit within Google SERP display limits.
๐งฎRobots.txt Generator
Generate a robots.txt file with crawl directives for search engine bots.
๐งฎXml Sitemap Size Calculator
Estimate XML sitemap file size and check if it exceeds the 50MB/50K URL limits.
๐งฎCanonical URL Generator
Generate canonical URL tags to prevent duplicate content issues in search engines.