Properly managing redirects ensures SEO authority is preserved, users reach the correct pages, and Google clearly understands your site structure. Avoid redirect chains, consolidate domain versions, use the right redirect types, and maintain documentation for ongoing performance.
Table of Contents
1. Introduction
Redirects are one of the core elements of technical SEO and site maintenance. They tell browsers and search engines that a page has moved and where to find it now. In simple terms, a redirection says:
“This page isn’t here anymore, go to this one instead.”
When implemented correctly, redirects help users avoid broken pages and allow search engines to understand which version of a page should be indexed. They also ensure that link equity (link juice), or “SEO value,” is passed from the old URL to the new one.
Redirects can be handled in different ways depending on your setup:
- Server-side: Managed directly in configuration files such as .htaccess (Apache) or nginx.conf (Nginx).
- CMS-based: Managed through plugins or built-in tools in systems like WordPress, Shopify, or Wix.
- Client-side: Implemented using meta refresh or JavaScript, although this method is not ideal for SEO.
For a deeper technical overview, Google’s official documentation on redirects and canonicalization provides useful best practices.
1.1 Why redirections matter for SEO and user experience
Redirects play a vital role in keeping your website functional, user-friendly, and search-engine-friendly. They:
- Preserve SEO authority: Proper redirects transfer ranking signals and backlinks from old pages to new ones.
- Prevent broken user journeys: Visitors who click an outdated link or bookmark still reach a live page.
- Support redesigns and migrations: When you change your site’s structure, redirects ensure that Google and users reach the correct URLs.
- Help search engines understand intent: Choosing the correct type of redirect communicates whether a move is temporary or permanent.
Using the wrong redirect type or setting up poorly structured redirects (like loops or long redirect chains) can cause slow crawling and indexing issues. Tools like Ahrefs’ Site Audit or Screaming Frog are great for detecting redirect problems.
1.2 Common situations where redirects are needed
Redirects are necessary in many common SEO and website management scenarios:
- Website redesign or CMS migration: When URL structures change and old pages need to point to new ones.
- Domain or brand change: Moving from oldbrand.com to newbrand.com while keeping SEO signals intact.
- Switching to HTTPS: Redirecting all HTTP versions to secure HTTPS URLs.
- Removing or consolidating content: Redirecting deleted or duplicate pages to relevant alternatives.
- Fixing trailing slash or www variations: Ensuring all URL versions resolve to a single canonical version.
Redirects are not just a patch for broken pages; they are a communication layer between your site, users, and Google. When used strategically, they preserve trust, authority, and visibility.

2. Understanding redirections
Before you start creating or editing redirects, it’s important to understand what types exist and what each one communicates to browsers and search engines. Redirects are not all equal — they send different signals depending on whether the move is temporary, permanent, or for a specific purpose like caching or load balancing.
Redirects are part of the HTTP status code family, which tells browsers how to handle a request. The most common redirect codes start with 3xx, and each code has a slightly different meaning and ideal use case.
For a full list, you can explore the MDN Web Docs on HTTP status codes.
2.1 Common types of redirects (301 to 308)
Here are the most important redirect types and what each one does:
301: Moved Permanently
A 301 redirect tells search engines and browsers that a page has been permanently moved to a new URL. This is the most common redirect for SEO because it passes most of the ranking power (link equity) to the new page.
Example:
If you moved fromexample.com/old-categorytoexample.com/new-category,a 301 ensures both users and search engines go directly to the new version.
Google treats 301s as a strong signal that the original page should be replaced in its index. You can read more in Google’s official redirect documentation.
302: Found / Moved Temporarily
A 302 redirect means the page has moved, but only for a short time. Search engines usually keep the original page indexed and don’t transfer ranking signals permanently.
Use 302s when testing a new page layout, running a short-term promotion, or temporarily removing a page.
303: See Other
A 303 redirect is used mainly in web applications to tell browsers to fetch a different resource using a GET request after submitting a form.
307: Temporary Redirect
A 307 is the modern version of a 302 but with stricter rules, it keeps the original HTTP method (for example, POST stays POST). It’s ideal when temporarily redirecting form submissions or API endpoints.
308: Permanent Redirect
A 308 works like a 301 but also keeps the original request method intact. It’s less common but useful when you want a technically precise permanent redirect that maintains request behavior.
2.2 Understanding GET and Non-GET Requests
When a browser communicates with a server, it uses different types of HTTP requests to perform various actions.
GET requests are used to retrieve information from the server, such as loading a webpage or viewing an image. They do not change any data on the server; they simply request information.
Non-GET requests are used when data needs to be sent, changed, or deleted on the server.
Common examples include:
- POST – sending new data, such as submitting a form
- PUT or PATCH – updating existing data
- DELETE – removing data
Redirect Rules Made Simple
When you move a page or resource, redirects tell browsers and search engines where to find it. Different status codes are used depending on whether the move is permanent or temporary, and whether the request is a GET or non-GET request.
| Move Type | For GET | For Non-GET | Meaning |
|---|---|---|---|
| Permanent move | 301 | 308 | The URL has moved permanently |
| Temporary move | 302 | 307 | The URL has moved temporarily |
The difference is important. The 301 and 302 redirects can change a POST request into a GET request, which may not be desired behavior. The 308 and 307 redirects keep the original request method, making them safer for actions like form submissions or API requests.
2.3 Redirects vs. canonical tags
While redirects send users and crawlers to a new URL, a canonical tag simply tells Google which version of a page is the “preferred” one. You use canonicals when multiple pages with similar content should point to one main version, but you still want them accessible.
Example:
If your store has product pages like:example.com/tshirt-blue and example.com/tshirt-blue?size=large,
you can keep both live but add a canonical tag pointing to example.com/tshirt-blue.
You can learn more about canonical tags in Google’s official guide.
2.4 Server-side vs. client-side redirects
Redirects can be implemented in two main ways:
- Server-side redirects:
These are preferred for SEO because they are processed before the page loads. Common examples include:
- .htaccess (Apache)
- nginx.conf (Nginx)
- Redirect rules in Cloudflare, Netlify, or hosting dashboards
- .htaccess (Apache)
Client-side redirects:
These happen in the user’s browser using HTML meta refresh or JavaScript. They are slower and less reliable for SEO.
Example of a meta refresh:<meta http-equiv="refresh" content="5; url=https://example.com/new-page">
- Google can follow them, but recommends avoiding them for SEO purposes.

3. When to use each type of redirect
Choosing the right redirect type can make the difference between keeping your SEO authority or losing valuable rankings. Each type of redirect tells Google and browsers something specific about your intent. Using the wrong one can cause confusion, traffic drops, or indexing issues.
Below are the most common scenarios you’ll face, along with the redirect type that fits best.
3.1 When to use a 301 redirect (permanent move)
A 301 redirect should be used when a page or entire site has permanently moved. This type passes most of the ranking value to the new URL and tells Google to replace the old one in its index.
Use a 301 redirect when:
- You are restructuring your site and changing URLs (for example, /category/shoes becomes /shoes/).
- You are moving to a new domain (for example, oldstore.com to newstore.com).
- You are merging similar pages into one stronger version.
- You are changing from HTTP to HTTPS.
Avoid using a 302 for these situations, because it tells search engines that the move is only temporary. Google’s documentation confirms that 301 redirects are best for permanent changes.
3.2 When to use a 302 redirect (temporary move)
A 302 redirect is suitable when you plan to bring the original page back soon. Google will typically keep the old URL indexed and not transfer link equity permanently.
Use a 302 redirect when:
- You are testing new designs or layouts on a live page.
- You have seasonal or temporary promotions and want to redirect users to a campaign page.
- A product is out of stock temporarily, and you want to redirect to a related item.
Once the original page is back, remove the redirect. If the new page becomes permanent, update the redirect to a 301.
3.3 When to use 307 or 308 redirects
These are less common but serve specific technical purposes:
- 307 redirect: A temporary redirect that keeps the original request method. It’s mostly used for form submissions, API calls, or when you need a technically strict 302.
- 308 redirect: A permanent redirect that also preserves the original request method. It’s like a 301, but more precise for web applications.
You’ll usually see these in use on modern web frameworks or when managing redirects via services like Cloudflare or Netlify.
3.4 When to avoid redirects altogether
Redirects are powerful, but sometimes they’re not the right solution. Avoid using them when:
- The old page is still relevant and valuable, in that case, keep it live.
- You want to show similar products, better to use internal links instead.
- You’re trying to manipulate rankings by redirecting unrelated pages.
- You already have multiple redirect hops (for example, A → B → C). Instead, make it A → C directly.
You can check for redirect chains and loops using tools like Screaming Frog SEO Spider.
3.5 Redirects during website redesigns and migrations
Website redesigns are one of the most common times redirects go wrong. When your URL structure changes, it’s critical to map all old URLs to their new equivalents before launch.
Best practices:
- Create a redirect mapping spreadsheet that lists old and new URLs side by side.
- Use a 301 redirect for all permanent URL changes.
- Avoid blanket redirects that send every page to the homepage — this confuses users and Google.
- Test your redirects before going live using Google’s URL Inspection Tool.
A smooth redirection strategy can prevent huge SEO losses during a relaunch.

4. How to write redirects (in .htaccess, plugins, and more)
Now that you understand which redirect to use and when, it’s time to look at how to actually create them. The method depends on your website setup, whether you’re using a CMS like WordPress or managing your server manually through configuration files.
The goal is always the same: make redirects efficient, avoid loops, and keep everything documented.
4.1 Writing redirects in .htaccess (Apache)
If your site runs on an Apache server, you can create redirects directly in the .htaccess file. This file sits in your website’s root directory and controls many server behaviors, including redirections.
Here’s the simplest 301 redirect example:
Redirect 301 /old-page https://example.com/new-page
If you’re redirecting an entire folder:
RedirectMatch 301 ^/old-category/(.*)$ https://example.com/new-category/$1
And if you’re moving from HTTP to HTTPS globally, you can add this rule:
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
Always back up your .htaccess file before editing it, as even a small typo can break your site. For more technical references, check Apache’s redirect documentation.
4.2 Writing redirects in Nginx
If your website runs on Nginx, redirects are defined in the main configuration file, usually named nginx.conf.
A basic 301 redirect looks like this:
server {
server_name example.com;
location /old-page {
return 301 https://example.com/new-page;
}
}
To redirect all traffic from HTTP to HTTPS:
server {
listen 80;
server_name example.com www.example.com;
return 301 https://example.com$request_uri;
}
After editing, always restart Nginx for changes to take effect. You can find detailed examples in Nginx’s redirect guide.
Important: If you’re not 100% sure what are you doing, consult your developers to avoid making critical mistakes.
4.3 Using plugins for redirects (WordPress and other CMS platforms)
If you use WordPress or another CMS, you can manage redirects easily through plugins. This is safer and faster than editing server files directly.
Popular WordPress plugins include:
- Redirection – lets you create and manage 301 redirects inside your dashboard, track 404 errors, and export your redirect list.
- Rank Math – includes a built-in redirect manager with regex support.
For Shopify or Wix users, redirects can be added through their built-in tools in the admin panel, typically under URL Redirects or SEO Settings.
4.4 Avoiding infinite loops and redirect chains
Redirect loops happen when two or more pages keep redirecting to each other. Redirect chains occur when a page redirects through multiple steps before reaching its destination. Both can harm user experience and SEO.
Example of a bad redirect chain:
A → B → C → D
Example of an infinite loop
A → B → C → A
The correct way:
A → D
Best practices to avoid problems:
- Always redirect old URLs directly to the final destination.
- Test your redirects using HTTP Status Checker or Ahrefs Redirect Checker.
- Avoid mixing redirect rules across plugins and server files unless you are certain they work together.
4.5 Documenting your redirects
Keep a simple spreadsheet where you track every redirect you add. Include columns for:
- Old URL
- New URL
- Type (301, 302, etc.)
- Date added
- Notes or reason for the redirect
This helps you manage large-scale migrations, avoid duplicates, and troubleshoot any unexpected behavior later.

5. Using regex for advanced redirects
When you have hundreds or thousands of URLs to manage, writing redirects one by one quickly becomes unmanageable. This is where regular expressions (regex) come in handy. Regex lets you create smart, pattern-based redirect rules that can match multiple URLs with a single line of code.
They are especially useful during large website migrations, ecommerce category restructuring, or URL cleanup projects where patterns repeat consistently.
If you’re new to regex, you can experiment safely using a tool like Regex101 before applying anything to your site.
5.1 What is regex and why use it for redirects
Regex (short for “regular expression”) is a set of characters that define search patterns. In redirect rules, it’s used to match parts of URLs dynamically rather than typing them out one by one.
Example:
Instead of creating multiple redirects like this:
Redirect 301 /old-products/shoes https://example.com/products/shoes
Redirect 301 /old-products/hats https://example.com/products/hats
Redirect 301 /old-products/jackets https://example.com/products/jackets
You can handle them all with one regex rule:
RedirectMatch 301 ^/old-products/(.*)$ https://example.com/products/$1
This saves time, reduces errors, and keeps your .htaccess file clean and fast.
5.2 Common regex patterns for redirects
Here are some useful regex examples you can adapt:
Redirect all URLs in a folder to a new folder: RedirectMatch 301 ^/blog/(.*)$ https://example.com/articles/$1
Redirect multiple old extensions to a single format: RedirectMatch 301 ^/(.*)\.php$ https://example.com/$1/
Redirect non-www to www: RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule ^(.*)$ https://www.%{HTTP_HOST}/$1 [L,R=301]
Redirect based on parameters: RewriteCond %{QUERY_STRING} ^id=123$
RewriteRule ^product$ https://example.com/new-product? [R=301,L]
Make sure to test every rule after applying it. Even a small error in regex can cause unintended redirects or infinite loops.
5.3 How to test regex redirects safely
Before pushing redirect changes live, always test them in a controlled environment:
- Use a staging server if available.
- Check with HTTP Status Checker or Screaming Frog’s redirect report.
- Keep a copy of your old redirect rules for easy rollback.
- Use Google’s URL Inspection Tool to confirm that redirects are recognized correctly.
5.4 When not to use regex
Regex is powerful, but it can be dangerous if misused. Avoid it when:
- You only need a few simple redirects – it’s better to write them manually.
- You are not sure how regex works – a wrong pattern could affect thousands of pages.
- Your server performance is a concern – overly complex regex rules can slow down load times.
For most smaller sites, individual redirects through a plugin or CMS tool are safer. Regex is best reserved for larger projects with consistent URL patterns.

6. Redirections during website redesign or relaunch
Website redesigns or relaunches are high-risk times for SEO because URL structures often change. Without a solid redirection strategy, you can lose traffic, backlinks, and rankings. Planning redirects in advance ensures both users and search engines land on the correct pages.
6.1 Prepare a redirect map
Before making any changes, create a redirect map listing:
- Old URLs
- Corresponding new URLs
- Redirect type (301, 302, etc.)
- Notes or reason for the redirect
This document serves as a blueprint for your migration and helps avoid missed pages or accidental loops.
6.2 Match old URLs to new structure
When redesigning your site, categorize which old pages map to which new ones. This is especially important for ecommerce sites where categories, product pages, and filters may be reorganized.
Example:
- Old: example.com/old-category/shoes
- New: example.com/products/shoes
Redirects should point directly to the final page, not through intermediate pages, to avoid chains that can hurt SEO.
6.3 Use the correct redirect type
- Use 301 redirects for permanent moves, which is typical for relaunches or URL restructuring.
- Use 302 or 307 only for temporary moves, such as A/B testing during the transition.
Google clearly states that 301 redirects pass ranking signals to new URLs.
6.4 Test all redirects before launch
Before making your redesigned site live:
- Test redirects in a staging environment.
- Check for redirect chains, loops, or broken links using tools like HTTP Status Checker.
- Verify that key pages are correctly indexed using Google Search Console’s URL Inspection Tool.
6.5 Monitor after launch
Once your site is live:
- Continuously monitor traffic drops and 404 errors.
- Ensure all high-value backlinks are redirected to appropriate pages.
- Adjust any redirects that may have been missed or misconfigured.
A well-planned and tested redirect strategy during a redesign preserves both SEO equity and user experience, avoiding unnecessary drops in traffic or rankings.

7. Bonus tips and ongoing maintenance
Setting up redirects correctly is just the first step. Maintaining them over time ensures your website continues to perform well in search engines and avoids unnecessary errors.
7.1 Check for redirect chains and loops
Redirect chains happen when a URL redirects through multiple steps before reaching the final page (A → B → C). Loops occur when a page redirects back to itself or creates an infinite cycle. Both hurt user experience and can confuse Google.
Always aim for direct redirects from the old URL to the final destination.
7.2 Avoid double redirects to your main homepage
A common issue occurs when your site has multiple versions, such as:
- http://example.com
- https://example.com
- http://www.example.com
- https://www.example.com
If backlinks point to different versions of your site and each one redirects through multiple steps before reaching the final version, you create double or triple redirects.
Example:
- A backlink points to http://www.example.com
- This redirects first to https://www.example.com
- Then finally, to https://example.com
This setup:
- Reduces link equity (link juice), as each redirection passes less link juice forward
- Can confuse search engines about which version of a page is canonical
Best practices:
- Choose one primary version of your website (for example, https://example.com)
- Redirect all other versions directly to this primary version using 301 redirects
- Ensure internal links, and sitemap URLs all point to the correct version
This ensures that all link equity is consolidated, users land on the correct URL quickly, and Google clearly understands your preferred domain. See Google’s site move guide for reference.
7.3 Monitor performance in Google Search Console
Google Search Console helps track how your redirects are performing:
- Go to Indexing to see pages with redirects
- Monitor traffic and clicks for redirected pages to detect any drop-offs
7.4 Keep documentation up to date
Maintain a redirect spreadsheet with columns for:
- Old URL
- New URL
- Redirect type
- Date created
- Notes or reason
This helps you:
- Avoid duplicate redirects
- Quickly identify pages that need updates
- Safely remove old redirects if no longer needed
7.5 Periodically review your redirects
Redirects are not a set-it-and-forget-it task. Periodic reviews ensure your site remains optimized:
- Remove redirects that are no longer necessary
- Update redirects after structural changes
- Confirm regex patterns still match correctly
- Check that high-value backlinks still redirect to the correct pages
Regular maintenance prevents unnecessary chains, keeps Google crawling efficiently, and maintains a smooth user experience.

8. Conclusion
Redirects are more than just technical fixes for broken links. They are a crucial part of SEO strategy and user experience management. Done correctly, they preserve SEO authority, maintain smooth user navigation, and guide search engines to the right pages. Done poorly, they can lead to lost rankings, slow site performance, and confusing signals for both users and Google.
Here are some key takeaways:
- Choose the right redirect type: Use 301 for permanent moves, 302 or 307 for temporary changes, and avoid meta refresh or JavaScript redirects for SEO-critical pages.
- Plan ahead for redesigns and migrations: Create a complete redirect map before making changes, and ensure every old URL points directly to the final destination.
- Avoid redirect chains and loops: Always redirect directly to the target page to preserve link equity and speed.
- Consolidate multiple domain versions: Make sure all traffic, backlinks, and internal links point to main version to avoid losing SEO value.
- Use regex wisely: Regular expressions can save time on bulk redirects but must be tested thoroughly to avoid unintended consequences.
- Document and maintain: Keep a clear log of all redirects, periodically review them, and update when necessary to prevent errors and maintain SEO performance.
Finally, don’t be afraid to analyze competitors. Look at how websites that rank higher than yours handle redirects, URL structures, and migrations. You can often spot patterns or strategies they implemented that you might adopt for your own site.
Approach redirects as a long-term strategy rather than a quick fix. A thoughtful, well-documented, and maintained redirect plan protects your site’s authority, improves user experience, and keeps Google aligned with your site structure.




