When do you need a 301?
You changed a URL
You edited a post or product URL, so send the old one to the new one instead of a 404.
You moved your site
To a new domain, or from a platform like Shopify to WordPress with different URLs.
You deleted a page
Redirect it to the closest page on the same topic, not to the homepage.
301 or 302?
| 301 | 302 | |
|---|---|---|
| Meaning | Permanent move | Temporary move |
| In Google | The new URL replaces the old one in results | The old URL usually stays in results |
| Use it for | Permanent URL or domain changes | Temporary offers or maintenance |
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.
