Generate flawless .htaccess permanent redirect code in seconds. Safely pass link equity and prevent 404 errors when moving pages, directories, or entire domains.
.htaccess file (make sure hidden files are visible) and paste this code at the top.
When you redesign a website, change URL structures, or delete outdated content, search engines and users will hit a "404 Not Found" error if they click an old link. A 301 Redirect Generator solves this by writing the exact server-level code needed to automatically forward traffic from the old URL to the new one. The "301" status code specifically tells Google that the move is permanent, ensuring that all your hard-earned SEO ranking power (link equity) is passed to the new page.
Writing Apache server rules manually can be highly error-prone. A single typo in an .htaccess file can take your entire website offline with a 500 Internal Server Error. Our URL Redirect Generator eliminates this risk by instantly building perfectly formatted regex and rewrite rules. Whether you need a simple single-page redirect, a wildcard directory match, or a full domain migration, our tool writes the secure code for you.
RewriteRule that captures all traffic hitting any page on the old site and forwards it to the exact same URL path on the new site.