.htaccess Redirect Generator
iWebSeoTool .htaccess Redirect Generator: Turn old and new URLs into ready-to-paste Apache redirect rules in your browser, with no sign-up and nothing uploaded. Add as many redirects as you need, then copy or download the result.
Your redirects (old page → new page)
Rule style
Whole-site presets (optional)
This tool writes redirect rules only — it does not check that the new pages exist, follow the redirects, or catch every possible loop, so test each redirect on your live site after adding the rules. Paste the rules into the .htaccess file in your site root and keep a backup of the file first. Everything runs in your browser — nothing is uploaded or stored.
How to use this tool
This htaccess redirect maker keeps each redirect as one simple row:
- Add a row for each redirect, with the old path, the new URL and the redirect type.
- Choose the Redirect or RewriteRule style for your rules.
- Use the optional HTTPS and www presets if you need a site-wide change.
- Copy the generated code or download it, then paste it into your .htaccess file.
- Test each redirect on the live site to confirm it lands where it should.
Choosing a redirect type
Pick the type that matches what actually happened to the page:
- 301 (permanent): use this when a page has moved for good. It is the right choice for most site moves and redesigns, and it is the type to create htaccess redirects with when the old URL will not return.
- 302 or 307 (temporary): use this when a move is only for a short time, such as a seasonal page or a test, and the original URL may come back.
- 410 (gone): use this for pages deliberately removed, to tell browsers and search engines the page is gone on purpose, rather than just missing.
Honest limits
As a 301 redirect code generator, this tool writes rules only. It does not check that the target pages exist, follow the redirects or catch every loop, so a rule can still be wrong even if it looks correct. Test the rules on the live site, keep a backup of your current .htaccess file, and check for conflicts with rules already in the file or set by your content management system. For a basic simulation, try the .htaccess Tester. In short, this Apache redirect rule builder does the writing; verifying the result on your own site is still essential, especially if you generate redirect rules online for a large migration.
Related tools
Frequently asked questions
Yes, using the presets. The HTTPS preset sends all HTTP traffic to the secure version, and the www preset sends traffic to either the www or the non-www version consistently. Use only one preset direction at a time, and check that it does not clash with rules already in your file.
No. It writes the redirect rules only. It does not check that the target pages exist, follow the redirects or catch every loop. After adding the rules, test each redirect on the live site and keep a backup so you can revert quickly.
Add one row for the redirect, with the old path, the new URL and the redirect type, then repeat for each further page. Choose the Redirect or RewriteRule style, generate the code, and copy or download it into your .htaccess file. Test the new URL afterwards to confirm it lands on the right page.
For simple one-to-one moves, the Redirect directive is easier to read and is usually enough. RewriteRule is more powerful and suits pattern-based rules, conditions and more complex matching, but it is also easier to get wrong. If your rule is a straightforward old URL to new URL move, start with Redirect.
A 301 redirect is permanent: it tells browsers and search engines that a page has moved for good, and it usually passes most of the old page’s ranking signals to the new one. A 302 redirect is temporary: it says the move may be undone, so search engines generally keep the old URL in their index.
The rules go in the .htaccess file in your site’s root folder, or in the folder the redirects should apply to. Yes, back up the current file first, so you can restore it quickly if a new rule causes a problem.
A loop happens when one rule sends visitors to a URL that another rule sends straight back again. Check for conflicting rules, for HTTPS and www presets that point in opposite directions, and for rules set by your content management system that may already handle the same URLs. Remove or correct the conflicting rule, then test again.