.htaccess Redirect Generator

Generate 301 and 302 redirect rules for Apache and LiteSpeed .htaccess files.

Tool

Was this tool useful?

About this tool

About .htaccess Redirect Generator

Redirects keep visitors and search rankings when URLs change. This tool writes correct .htaccess rules for single pages, www/non-www, HTTPS and domain moves.

Example

“/old-page /new-page” becomes: Redirect 301 /old-page /new-page

How to use this tool

  1. Choose the type of redirect.
  2. Enter old and new paths, or the new domain.
  3. Copy the rules into the .htaccess file in your site’s root folder.

Frequently asked questions

301 or 302?

Use 301 for permanent moves so search engines transfer ranking signals. Use 302 only for short-term changes.

Does this work on Nginx?

No. Nginx does not read .htaccess files; its redirects go in the server configuration.

Will using the .htaccess Redirect Generator improve my rankings?

The .htaccess Redirect Generator helps you get the technical details right, which removes problems that can hold a page back. Rankings still depend mostly on helpful content, links and user experience, so use it as part of a wider SEO plan.