Htaccess Redirect Generator
Fill From path and To URL/path to produce a single Apache Redirect 301 line. The rule updates as you type, ready to paste into .htaccess when you move a page and want permanent redirect traffic.
Updated 2026-08-03 · seo
About this tool
This htaccess redirect generator concatenates Redirect 301, the From path, and the To URL or path with spaces. It does not validate server config beyond building that one line. Use absolute or root-relative targets the same way your host’s Apache Redirect directive expects.
How to use
- Open the generator: Load this page so From path, To URL/path, and the live result appear.
- Enter the old path: Type the path visitors used before, such as /old-page.
- Enter the new target: Type the destination path or full URL, such as /new-page.
- Copy the Redirect line: Copy the result that looks like Redirect 301 /old-page /new-page into .htaccess.
Common use cases
- Create a permanent redirect after renaming a blog post or product URL.
- Draft several 301 lines before pasting a batch into .htaccess during a site move.
- Hand a developer an exact Redirect 301 line for an old path that still gets hits.
Tips
- From path usually starts with a slash, such as /old-page matching the sample.
- Prefer 301 for permanent moves so search engines update the indexed URL.
FAQ
What kind of redirect does this create?
A Redirect 301 line for Apache’s Redirect directive, meaning a permanent redirect.
Can the To field be a full URL?
Yes. Use a path or a full URL, depending on what your Apache host allows for Redirect.
Does this edit my server for me?
No. It only builds the text line; you paste it into .htaccess and reload Apache as needed.
Is my path data uploaded?
No. The Redirect line is built in your browser as you type.