.htaccess Redirect Generator: Easily create redirect rules for your website.
.htaccess Redirect Generator: Easily create redirect rules for your website.
Use our **free .htaccess Redirect Generator** to **easily create 301, 302, and URL rewrites** for your **Apache server**. Improve **SEO, website structure, and user experience** with proper redirections.
A **301 redirect** tells search engines that a page has **permanently moved** to a new URL. It **passes SEO value** to the new page.
Redirect 301 /old-page.html https://example.com/new-page.html
A **302 redirect** is used for **temporary changes** where you don’t want search engines to pass SEO value.
Redirect 302 /old-page.html https://example.com/new-page.html
Use this rule to force all traffic to the **non-WWW** version of your site:
RewriteEngine On RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC] RewriteRule ^(.*)$ https://%1/$1 [R=301,L]
To ensure your site always loads over **HTTPS (SSL)**:
RewriteEngine On RewriteCond %{HTTPS} !=on RewriteRule ^(.*)$ https://example.com/$1 [R=301,L]
If you are moving to a **new domain**, use this rule:
RewriteEngine On RewriteCond %{HTTP_HOST} ^oldsite.com [NC] RewriteRule ^(.*)$ https://newsite.com/$1 [R=301,L]
The `.htaccess` file is located in the **root directory** of your website.
Yes, you can add multiple redirect rules, but make sure they don’t conflict.
Use an **HTTP Status Code Checker** or browser tools to confirm the redirection.
Proper **.htaccess redirects** are crucial for **SEO, user experience, and site performance**. Use our **free .htaccess Redirect Generator** to create custom redirections easily.