HTACCESS Redirect
HTACCESS redirect generator online tool.
Processes your input locally. Review generated configuration before publishing.
Loading tool…
What this tool does
Generate an Apache Redirect directive for a plain source path and destination URL. Server configuration determines whether it applies.
How to use it
- Set source path (initial value: /old).
- Set destination url.
- Set http status to one of: 301, 302.
- Choose Process, inspect the result, then use the download control. A reported error means no successful output was produced.
Limits and result checks
Accepts a plain slash-prefixed path and HTTP(S) destination with status 301 or 302. Query matching and complex rewrite conditions are outside this generator.
Common questions
Which source path settings affect htaccess redirect generator?
Source path: supply the content you want processed. Processes your input locally. Review generated configuration before publishing.
Where can I read the data-handling details for HTACCESS Redirect?
Inputs are processed in browser memory and are not uploaded by this plugin. Generated downloads remain on your device. The site privacy policy explains memory cleanup and hosting logs.
File processing and privacy · Report a problem
What an .htaccess redirect does
On Apache servers — the kind most shared WordPress and website hosting runs on — the .htaccess file is where you instruct the server itself to send visitors from an old address to a new one. A redirect written there fires before any page loads: fast, invisible and total. It is how sites survive redesigns, renamed pages and moved sections without stranding every link the internet has ever made to them.
Writing redirects that do not break the site
Two disciplines keep .htaccess safe. First, precision: each rule should name the exact old path and the exact new one, because a loose pattern can catch pages you never meant to move. Second, respect the file: .htaccess is unforgiving of typos — a malformed line can take a whole site offline — so add rules a few at a time, test each old address immediately, and keep a copy of the previous version so any change can be undone in seconds. Generated code earns its keep here: the syntax is fiddly, and a generator removes the class of errors that come from typing it by hand.
What is the difference between a 301 and a 302 redirect?
A 301 is permanent: it tells search engines the move is forever and passes the old page’s standing to the new one — the right choice for renamed or moved content. A 302 is temporary and keeps the old address’s standing. Using 302 for a permanent move is the classic quiet mistake.
Where does the generated code go?
In the .htaccess file in your site’s root folder, normally added to what is already there — never replacing the whole file blindly, because it likely contains rules your site depends on. If the file does not exist, your host’s file manager or support can confirm whether your server uses one at all.
Why did my site break after adding a rule?
A syntax error or a redirect loop — two rules sending addresses to each other. Remove the lines you just added, confirm the site recovers, then re-add them one at a time, testing between each. This is why the backup copy matters.