Send feedback

Coming from the page: 301 Redirect Generator

One moment…

Tested on Apache, LiteSpeed & NginxLoop & chain checksNo ads

301 Redirect Generator

Move old URLs to new ones without losing visitors or Google rankings.

Server

You can paste two columns from Excel or Google Sheets. Use paths like /old-page/ or full URLs; add * at the end of both to move a whole folder.

Result: every visit lands on https and one version of your domain, in a single redirect.

.htaccess

Paste at the top of .htaccess in your site root (public_html), before # BEGIN WordPress. Keep a copy of the file first.

When do you need a 301?

1

You changed a URL

You edited a post or product URL, so send the old one to the new one instead of a 404.

2

You moved your site

To a new domain, or from a platform like Shopify to WordPress with different URLs.

3

You deleted a page

Redirect it to the closest page on the same topic, not to the homepage.

301 or 302?

301302
MeaningPermanent moveTemporary move
In GoogleThe new URL replaces the old one in resultsThe old URL usually stays in results
Use it forPermanent URL or domain changesTemporary offers or maintenance
Before you edit: Keep a copy of your .htaccess. A mistake in this file can take your site down; if that happens, restore the original right away.

FAQ

What is a 301 redirect?

It tells browsers and Google that a page has moved permanently. Visitors are sent to the new URL automatically, and Google transfers the old page’s ranking to the new one.

Where do these lines go in WordPress?

In the .htaccess file in your site root (public_html), via your host’s file manager, above # BEGIN WordPress.

Does it work on LiteSpeed hosting?

Yes. LiteSpeed reads .htaccess just like Apache, and we tested the generated rules on real Apache, LiteSpeed and Nginx servers.

Is the query string (like UTM tags) kept?

Yes, anything after ? in the visitor’s URL is carried over, unless the old URL itself has a ?; then only that exact URL is redirected.

How long should redirects stay?

As long as possible, and at least a year as Google recommends. Removing them early sends old links back to a 404.

Are my URLs stored?

No. Everything runs in your browser; nothing is sent to a server.