Free tool
.htaccess redirect generator
Moving pages or rebuilding your site? Paste your old and new URLs and get clean 301 redirect rules for Apache — plus the nginx equivalent — with HTTPS and www canonicalization built in.
# Add "old-path new-path" lines above or enable an option # to generate your .htaccess rules.
How to use
Three steps, ten seconds
- 01
Paste your URL pairs
One redirect per line: the old path, a space, then the new path — for example '/old-page /new-page'. Full URLs work as destinations too.
- 02
Set your options
Choose 301 or 302, force HTTPS, and pick a www policy so every visitor and crawler lands on one canonical version of your domain.
- 03
Copy the config
Grab the .htaccess block for Apache hosts, or flip to the nginx tab for the equivalent server rules, and paste it into your server config.
FAQ
Common questions
Should I use a 301 or a 302 redirect?
Use 301 (permanent) for almost everything — moved pages, site migrations and deleted content with a replacement. It tells Google to transfer the old page's ranking signals to the new URL. Use 302 (temporary) only when the move genuinely is temporary, like an A/B test or seasonal page, so Google keeps the original URL indexed.
Where does the .htaccess file go?
In the folder the rules should apply to — usually your site's web root (often called public_html), alongside your homepage. The filename is exactly '.htaccess' with the leading dot and no extension. It works on Apache and LiteSpeed servers; if your host runs nginx, use the nginx tab instead, since nginx ignores .htaccess files.
Do redirects hurt SEO?
Done right, they protect it. A 301 redirect passes the vast majority of link equity to the new URL. What hurts is leaving old URLs returning 404s, chaining several redirects together, or redirecting everything to your homepage instead of the closest matching page. Redirect each old URL to its most relevant replacement.
More free tools
Keep the momentum going
Robots.txt Generator
Build a valid robots.txt — allow crawlers, block AI bots, add your sitemap — and copy it.
Open tool →SERP Preview
See exactly how your page appears in Google on desktop and mobile before you publish.
Open tool →Meta Tag Generator
Write title and description tags, preview the Google result and copy the HTML.
Open tool →Free website audit
Want the full picture?
Tools fix one thing at a time. Our free audit checks your whole site — speed, SEO, mobile, security — and tells you exactly what is costing you customers.
Run the free 20-second scan →