Htaccess Redirect Generator

Htaccess Redirect Generator

Generate code for your website’s .htaccess file

Redirect Configuration

301 redirects are best for SEO when pages have permanently moved.

For a single page: /page-name. For a directory: /directory/*

Generated Code

Fill out the form and click “Generate Redirect Code”

Common Redirect Examples

Redirect a Single Page

Source: /old-page

Destination: /new-page

Redirect Entire Directory

Source: /old-directory/

Destination: /new-directory/

Redirect to External Site

Source: /redirect-page

Destination: https://example.com/

Preserve URL Path (RewriteRule)

Source: old-blog/(.*)$ (use regex)

Destination: new-blog/$1

Scroll to Top