Free Redirect Rule Generator
Draft an Apache redirect example for an old and new URL. Use this free browser-based utility to prepare or evaluate your work without an external API.
Processing takes place in your browser.
How to use the Redirect Rule Generator
Enter two distinct clean URLs on the same origin. Select permanent 301 or temporary 302. Review the generated Apache mod_alias example.
Important considerations
The example uses path-prefix matching, not an exact URL match. Test in staging and adapt to your server or WordPress redirect plugin.
Frequently asked questions
Does this require an API? No. The calculation or transformation runs locally.
Can I copy the output? Yes. Use Copy result or select the output manually.
Does this verify live campaign or website data? No. Review your inputs and validate the result against your actual requirements.
Explore all free tools, the related AI stack and SEO software.
Test redirects during a website migration
Build a redirect inventory before changing URLs. Record the original address, the most relevant replacement and whether the change is permanent or temporary. For pages with no meaningful replacement, evaluate the appropriate missing-page behavior rather than automatically redirecting everything to the homepage. Visitors following an old link should arrive somewhere that genuinely addresses the same purpose when a replacement exists.
Imagine an article moving from /blog/design-guide to /resources/design-guide. A permanent redirect may be appropriate if the article has permanently moved. However, the Apache example generated here matches a path prefix. Depending on configuration, a request for a deeper path under /blog/design-guide may also be redirected, with the remaining suffix appended. Test the exact source URL and potentially affected neighboring paths. If exact matching is needed, use a suitable rule mechanism configured by someone familiar with the server.
Review existing redirect layers before installing anything. A CDN, hosting platform, WordPress plugin and web server can each apply redirects. Adding another rule without understanding those layers can create loops or chains. Check whether HTTP-to-HTTPS and domain normalization already occur elsewhere. Preserve required query parameters and confirm that the final address returns the intended successful response. Never overwrite a production configuration file solely with generated example text.
Once the migration is published, update navigation, editorial links, canonical tags and sitemap entries to refer directly to the new addresses. Keep redirects for legitimate existing incoming links as appropriate, and monitor requests for unexpected errors. Compare search reporting over time while accounting for other changes made during the migration. The calculator’s output is a starting point for implementation, not a live verification of the website or a guarantee of retained traffic.
What is website redirect rules?
A redirect tells a browser or crawler that a requested URL should lead to another destination. Redirects are useful when pages move, a website changes its URL structure or a temporary alternative is needed. This generator creates a simple Apache mod_alias example using a source path and destination URL. It is intended for planning, not automatic configuration.
Step-by-step instructions
Enter old and new absolute HTTP or HTTPS URLs on the same origin, without queries or fragments. Choose 301 for a permanent move or 302 for a temporary one. Generate the example and inspect the source path. Share the proposed rule with your hosting administrator or use a supported WordPress redirect manager. Test it in staging.
How the tool works
The tool extracts the source pathname and builds an Apache Redirect directive with the selected status and destination. Apache mod_alias Redirect uses path-prefix matching, so a request under the source path may also match and append the unmatched suffix. This is not an exact-match rule. It does not check existing rules, live status, server type or availability.
Practical examples
| Scenario | Example |
|---|---|
| Permanent move | Move /blog/guide to /resources/guide. |
| Temporary campaign | Send /offer to /seasonal-offer during a promotion. |
| URL cleanup | Move an obsolete slug to a relevant replacement. |
| Migration | Test the intended path and similar paths for prefix surprises. |
Using the result effectively
Plan redirects around equivalent destinations. If a page is removed without a meaningful replacement, redirecting to an unrelated homepage may not serve visitors. Update internal links, canonical references and sitemaps to the final URL. Test status, destination, query handling and possible chains. Keep a record of old URLs and monitor unexpected errors.
Common mistakes and best practices
Do not paste Apache directives into Nginx or assume every managed WordPress host supports .htaccess. Never replace an entire configuration with one generated line. Avoid loops, chains, broad prefixes and unrelated destinations. A 301 does not guarantee retained rankings. Keep a backup and use staging or a supported redirect plugin.
Additional frequently asked questions
What is 301?
A permanent HTTP redirect.
What is 302?
A temporary HTTP redirect.
Is the rule an exact match?
No, it is a path-prefix Apache example.
Does it change WordPress?
No, it generates text.
Can I redirect between domains?
Not with this same-origin tool.
Should I test every redirect?
Yes, including similar paths and the destination.
Browse the complete Free SEO Tools collection to find complementary utilities for your workflow.
Related freetools
Continue with the seo slug generator and xml sitemap generator.