.htaccess redirect generator
One line per move: the old path, then the new path. The link redirect generator outputs the rules for nginx, Apache, Cloudflare Pages / Netlify and a note for Shopify, so a migration does not lose the pages that already rank.
.htaccess 301 redirects
The Apache card below gives one Redirect 301 /old /new line per move. Paste it into the .htaccess file in your site root, or into the virtual host config if you can edit it; the vhost is faster because Apache does not re-read it on every request.
To move a whole folder, use mod_rewrite: RewriteEngine On then RewriteRule ^blog/(.*)$ /articles/$1 [R=301,L]. To move a whole domain: RewriteCond %{HTTP_HOST} ^old\.example$ [NC] then RewriteRule ^(.*)$ https://new.example/$1 [R=301,L]. Do not mix Redirect and RewriteRule for the same paths; they run in different modules and the order is hard to predict.
How to use it
Plan the moves first with a redirect mapping template and migration QA workflow. For server configuration, see Nginx 301 redirect examples.
Paste the output where your server reads it, then check that each old URL resolves in one hop with the bulk URL checker. Prefer absolute paths for the new URL. If you moved a whole section, a single prefix rule beats hundreds of lines.
Example: enter /old-product /products/new-product. The nginx output is location = /old-product { return 301 /products/new-product; }. After publishing the rule, paste https://your-site.example/old-product into the bulk checker. Look for one 301 hop followed by a 200 at the intended product page; a second redirect or an unrelated destination needs a rule change.