Site-wide rules
An .htaccess redirect generator turns a list of old-to-new URL mappings into the Apache directives that perform the redirects. The .htaccess file is a per-directory configuration file that the Apache web server reads on every request, and it is the standard place to declare redirects on shared hosting where you cannot edit the main server configuration. This tool writes both the mod_alias Redirect lines used for exact paths and the mod_rewrite RewriteRule lines used for pattern matches, so you can paste the result straight into the file at your site root.
Redirects exist mostly to protect the traffic and search rankings you have already earned. When a page moves, a 301 permanent redirect sends visitors and search engine crawlers to the new address and passes almost all of the old page's ranking signals along with them; a 302 temporary redirect forwards visitors but tells crawlers the move is not permanent, so the original URL keeps its ranking. Choosing the wrong status code, or leaving a moved page to return a 404, is one of the most common ways a site quietly loses organic traffic after a redesign or migration.
Beyond page-level redirects, the generator also produces the two site-wide rules almost every site needs: forcing every request onto HTTPS, and settling on a single canonical host by either adding or removing the www prefix. Serving the same content on http and https, or on both www and non-www, splits ranking signals and can trigger duplicate-content confusion, so these rules are as much an SEO concern as a security one. Everything is assembled in your browser from the values you type, so no URLs or site data are uploaded, and the tool works offline once the page has loaded.
Enter each old path in the source field and its new path or full URL in the destination field. Add a row for every URL you need to move.
Pick 301 for a permanent move or 302 for a temporary one, and choose an exact path or a regex pattern for each rule.
Turn on Force HTTPS and pick a www option to canonicalize your host. These directives are placed ahead of your page redirects.
Generate the rules, copy or download them, and paste them into the .htaccess file in your site root. Test a moved URL before you rely on it.
Set each rule to a permanent 301 or a temporary 302, so ranking signals move or stay exactly as you intend.
Redirect a single path with mod_alias Redirect, or match many URLs at once with a mod_rewrite RewriteRule pattern.
Add the standard rule that upgrades every HTTP request to HTTPS, placed first so later host rewrites also land on https.
Add or remove the www prefix with one setting to consolidate your site on a single canonical host.
Free hreflang generator for multilingual and multi-region sites - build hreflang tags as HTML link tags, XML sitemap entries, or an HTTP header. Validates codes and x-default. 100% client-side.
Generate SEO, Open Graph, and Twitter Card meta tags for any page, with live preview and length checks
Build, validate, and test a robots.txt file - user-agent groups, allow/disallow rules, sitemaps, AI crawler blocking, and a live URL tester
Turn a list of URLs into a valid XML sitemap with lastmod, changefreq, and priority - ready to submit to Google Search Console. 100% client-side.
0 comments
No comments yet. Be the first to share your thoughts!