Free 301 Redirect Generator & URL Builder

Generate flawless .htaccess permanent redirect code in seconds. Safely pass link equity and prevent 404 errors when moving pages, directories, or entire domains.

Enter the relative path of the old page (starting with a forward slash).
Enter the absolute, full URL of the new destination (including https://).
Generated .htaccess Code
How to install: Access your website's root folder via FTP or cPanel File Manager. Open the .htaccess file (make sure hidden files are visible) and paste this code at the top.

Why Use a 301 Redirect Generator?

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.

The Best .htaccess Redirect Code Builder

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.

Frequently Asked Questions

What is a 301 Redirect?
A 301 redirect is an HTTP status code indicating that a URL has permanently moved to a new location. It is the most SEO-friendly way to forward users, as it tells search engines to transfer the indexing properties and ranking power from the old URL to the new one.
Should I use a 301 or 302 redirect for SEO?
You should almost always use a 301 (Permanent) redirect. A 302 redirect indicates a temporary move and does not pass SEO link equity. Only use a 302 if you plan on bringing the old URL back in the near future (e.g., during temporary site maintenance).
How do I redirect an entire domain?
Select "Entire Old Domain to a New Domain" in our tool. Enter your old domain name and the new domain URL. The generator will create a 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.