Why Use .htaccess Redirects?
The .htaccess (hypertext access) file is a directory-level configuration file supported by Apache web servers. It allows you to manage URL redirections, rewrite paths, and enforce HTTPS access without modifying server configuration files.
Using 301 (permanent) redirects is critical for SEO:
- Redirecting legacy URLs to new target locations prevents users from landing on broken pages.
- Passing link authority to the new URLs helps maintain search engine rankings.
Step-by-Step Guide: How to Use this Tool
- Enter the relative path of the old URL (e.g.
/old-page.html). - Enter the absolute URL of the new page (e.g.
https://www.newsite.com/new-page). - Select your redirect type (301 for permanent, 302 for temporary).
- Optionally enable Force www canonicalization rewrite rules.
- Copy the generated code, paste it into your
.htaccessfile, and upload it to your server root.