4 Best Magento 2 Custom Redirect Extensions with URL Rewrites
Are you struggling to manage URLs on your Magento 2 website? Magento 2 custom redirect helps you manage & optimize URL redirections on your site.
This article will cover the key aspects of using a URL rewrite with a Magento 2 custom redirect plugin.
Key Takeaways
- Benefits of using proper URL redirects to improve website performance.
- Methods to ensure visitors always land on the correct pages, enhancing user experience.
- Key strategies to optimize your website's URL management and SEO performance.
- Top 4 extensions that support both 301 and 302 redirects with custom URL redirects.
- Tips to monitor 404 errors and maintain SEO rankings.
- Troubleshooting common issues to improve your site's performance and URL structure.
- Steps to set up redirects and find the 404 errors and broken links.
-
Why Do You Need to Create Magento 2 Redirect Loops with a Custom URL?
-
3 Steps to Create URL Redirects in Magento 2 with a Custom Redirect Extension
-
Best Practices for Preventing Duplicate Form Submissions with Custom URL Redirects
-
Troubleshooting Custom URL Challenges with Conflicting Magento 2 Redirect Rules
Why Do You Need to Create Magento 2 Redirect Loops with a Custom URL?
Magento 2 custom redirect is an essential tool for eCommerce store owners looking to:
- Create specific redirections from the old URL domain to the new one.
- Improve the user experience.
- Avoid "404 errors".
- Boost their site's SEO performance.
- Improve conversion rates by minimizing user frustration
- Concentrate ranking potential by redirecting multiple similar pages to a single, authoritative page
A custom rewrite allows you to manage redirects from your website to another site. With this, you can redirect a:
- Product
- Product catalog
- An entire page to a different website
Unlike standard redirects, custom rewrites help you:
- Redirect to external domains
- Create complex redirection logic based on user groups
- Implement conditional redirects
- Redirect based on customer attributes
- Implement geo-targeted redirects
- Create dynamic redirection rules
Key Fields of a Custom URL Redirect
Field | Description |
---|---|
Create URL Rewrite | Displays redirect type (unchangeable after creation): - Custom redirects for miscellaneous pages - For Category - For Product - For CMS Page |
Request Path | Represents the original URL that needs redirection. The path must be unique within your specified store view to avoid conflicts. |
Target Path | Specifies the destination URL where visitors will be redirected. It can be either an internal store path or a fully qualified external URL. |
Redirect Type | Available options: - No Redirect: Refers to a standard URL rewrite without redirection - Temporary (302): Indicates a temporary move to search engines - Permanent (301): Signals a permanent move, preserving SEO value |
Description | An optional field for internal reference where you can document the purpose of the redirect. |
Store View Selection | For ecommerce multi-store setups, this field allows you to specify which store view the redirect applies to. |
3 Steps to Create URL Redirects in Magento 2 with a Custom Redirect Extension
Step 1: Prepare Before Enabling Rewrite Options
When setting up a redirection, some admins may confuse "Redirect to" with "Redirect from". They are often considered as "target" and "source," respectively.
Before starting the redirection, verify that the URLs you’re working with are accurate.
For example:
-
Redirect to:
http://www.new-website.com/new-page.html
-
Redirect from:
-
product.html
-
category.html
-
Step 2: Create URL Rewrite Rules
- From the Admin sidebar, navigate to Marketing.
- Select 'URL Rewrites' under the SEO & Search section.
- Check if the 'Request Path' already exists.
To do this:
- In the Request Path search field, enter the keyword for the website you want to redirect and click 'Search'.
- Choose the relevant result for your store view and click 'Edit' to open the redirect record.
- If the old redirect exists, click 'Delete' and confirm by clicking 'OK'.
- Once back on the URL Rewrites page, click 'Add URL Rewrite'.
- In the 'Create URL Rewrite' box, select "Custom".
- Under 'URL Rewrite Information', choose the store view if you have multiple.
- In the 'Request Path' field, enter the URL keyword or the path of the:
- Product
- Category
- Page to be redirected ("Redirect from")
- Ensure the Request Path is unique.
- In the 'Target Path' field, input the new URL where the redirection will send users ("Redirect to").
Note: If the destination is an external website, provide the full URL.
- In the Redirect Type field, select one of the following:
- Temporary (302)
- Permanent (301)
- Click 'Save' to complete the process.
- The new rewrite will appear in the list.
Step 3: Verify the Redirect
To test the redirection:
- Go to your store's homepage.
- Enter the original "Redirect from" URL (e.g.,
product.html
orcategory.html
) into the browser after the store URL. - Press 'Enter'.
- The browser should redirect to the new page.
Note: The page should show the "Redirect to" page instead of the original "Redirect from" page.
Best Practices for Preventing Duplicate Form Submissions with Custom URL Redirects
Practice | Description | Implementation |
---|---|---|
Server-Side Validation | Primary defense against duplicate submissions | - Implement session-based tracking. - Use unique form tokens. - Store submission records in the database. |
Cookie Implementation | Secondary prevention method | - Set unique cookie values. - Track submission status. - Configure proper expiration times. |
Form Button Control | Client-side prevention | - Disable the submit button after the first click. - Add loading state indicators. - Reset button state after response. |
URL Redirect Management | Post-submission handling | - Set up 302 redirects for form submissions. - Implement proper redirect chains. - Configure custom redirect rules. |
Response Handling | Server response optimization | - Use proper HTTP status codes. - Implement clear success messages. - Handle errors gracefully. |
Performance Monitoring | System health tracking | - Monitor submission patterns. - Track redirect performance. - Analyze server logs. |
User Experience | Form interaction optimization | - Add visual feedback. - Implement progress indicators. - Provide clear submission status. |
Database Management | Data integrity preservation | - Check for duplicate entries. - Implement unique constraints. - Implement regular database cleanup. |
4 Best Custom Redirect Extensions for Magento 2
1. Magento Site Custom Redirect Customer Extension by MageComp
MageComp Magento Site Custom Redirect Customer Extension enables you to redirect users to specific URLs following events such as:
- Registration
- Login
- Logout
- Product additions to the cart
This extension lets you set custom URLs to redirect customers after they:
- Register
- Sign in
- Log out
- Add products to their shopping cart
These redirects can be adjusted based on customer groups. They offer better control over event management & redirection processes on your Magento website.
Features
- Redirect customers to a specific CMS page, custom path, or external website.
- Set up redirection after a customer logs in.
- Redirect users after they log out.
- Redirect visitors to a designated URL after they sign up.
- Set up redirection after a product is added to the cart.
- Specify customer groups for redirection to specific web locations.
- Redirect to the homepage when a 404 error (page not found) occurs.
- REST API and GraphQL API support available.
- Fully compatible with Hyvä.
Pricing
- Community Edition + GraphQL- $98.00
- Commerce on-prem (EE) Edition + Professional Installation + GraphQL- $276.00
- Commerce on Cloud (ECE) Edition + Installation & Setup + GraphQL- $296.00
2. Magento 301 Custom Redirect Extension by CynoInfotech
CynoInfotech Magento 301 Custom Redirect Extension allows for flexible redirection to a:
- Custom URL
- Homepage
- "My Account" page
- Back to the same or previous page
Instead of redirecting to the website’s default page, the admin can configure custom redirection for:
- Individual customers
- Customer groups
Features
- Redirect customers to specific custom pages or URLs.
- Set up redirection after customer registration, login, and logout.
- Redirect customers to a custom URL based on their customer group.
- Direct customers to the following:
- Thank You page
- Discount coupon page
- Special offers for customer groups
Pricing
- Open Source (CE) Edition + Installation- $108.00
- Commerce using on-prem (EE) Edition + Installation- $208.00
- Commerce on Cloud (ECE) Edition- $159.00
3. Magento 2 Store Pro Custom Redirect Behavior Extension by MagePsycho
MagePsycho Magento 2 Store Pro Custom Redirect Behaviour Extension offers a broader range of redirection options, including:
- GeoIP redirects
- Browser language redirects
- 404 redirects
Features
- Allow customers to select their preferred customer group during registration/checkout via a:
- Group dropdown
- Group code
- Redirect retail customers to the retail store after logging in from any of your multi-store websites.
- Redirect wholesale customers to a welcome page upon registration with a:
- Customized success message
- Email template
- Send customers to a coupon page after they subscribe to your newsletter.
Pricing
Starts from $45.00
4. Magento 2 Backend Multiple Redirect with Custom URL Extension by Emmo
Emmo Magento 2 Backend Multiple Redirect with Custom URL Extension redirects customers to:
- A popup modal to say goodbye
- Offer discounts
- Encourage newsletter subscriptions
This module is useful for both single-store and multi-store websites. It allows you to promote your site and bring customers back. This type of redirection increases customer engagement by delivering more relevant, personalized content. By guiding customers to more relevant pages, you can improve conversion rates.
Features
- Customer group-based redirection
- Multiple store support
- SEO-friendly redirection
- Improved store communication rate
- Compatible with Magento backend
Pricing
- Magento Open Source (CE) + Installation Service- $84.99
- Adobe Commerce using on-prem (EE) + Installation Service- $134.98
Troubleshooting Custom URL Challenges with Conflicting Magento 2 Redirect Rules
Challenge | Description | Solution |
---|---|---|
Redirect Loops | Occurs when conflicting custom redirect rules create endless redirection cycles between pages | - Audit existing redirect rules regularly. - Remove conflicting redirect paths. - Ensure each URL has only one redirect destination. |
404 Errors | Pages not found despite redirect setup | - Verify Request Path accuracy. - Confirm Target Path exists. - Clear Magento cache. - Update your internal links to new URLs. |
Performance Impact | Multiple redirects affecting site speed | - Minimize redirect chains. - Implement direct redirects. - Conduct regular monitoring of redirect performance. - Remove obsolete redirects. |
SEO Complications | Incorrect redirect types affecting search rankings | - Use 301 redirects for permanent moves. - Implement canonical tags. - Preserve link equity. - Monitor search engine indexing. |
Query Parameter Issues | Redirects failing with URL parameters | - Configure parameter handling. - Test redirects with various parameter combinations. - Ensure proper wildcard usage. |
Cache-Related Problems | Outdated cache preventing redirect updates | - Clear Magento 2 cache after changes. - Refresh the URL rewrite cache. - Verify changes in different store views. |
Multi-Store Conflicts | Redirects working inconsistently across store views | - Set store-specific redirect rules. - Check store view configurations. - Maintain separate redirect logs per store. |
FAQs
1. How do I create a 301 redirect in Magento 2?
To create 301 redirects in Magento 2, go to the Magento 2 backend. Navigate to Marketing > URL Rewrites. Click 'Add URL Rewrite', select 'Custom', and enter the 'Request Path' (the URL you want to redirect). Then, set the 'Target Path' and choose "Permanent (301)" under 'Redirect Type'.
2. What is the difference between a 301 and 302 redirect?
A 301 redirect is used to redirect the old URL to a new one permanently. You can transfer the equity link from the old URL to the new page. A 302 redirect, however, indicates that the content is temporarily located elsewhere. It doesn't pass on full link equity or affect SEO rankings.
3. Can I use a custom CMS page for redirecting purposes?
Yes, Magento 2 allows you to redirect customers to a specific CMS page whose URL you want. You can create 301 redirects to direct users to a specific page that this URL rewrite points to. It allows businesses to enhance customer experience by guiding them to relevant content.
4. How do URL query parameters affect redirects?
URL query parameters during redirects sometimes cause issues, like redirect loops/broken links. Suppose the URL you want to redirect contains parameters. In that case, you must account for them in your htaccess file or URL rewrite rules to avoid problems. It allows you to address your store's SEO and traffic in analytics tools.
5. What happens if I don't set up redirects?
If you need to redirect a specific page/product/category but fail to create a redirect, users may land on generic pages or encounter a 404 error. It can lead to loss of referral data and lower SEO performance. Setting redirects improves user experience and ensures that visitors find relevant content.
6. How do I handle a redirect for a specific category or product?
In Magento 2, you can create 301 redirects for a specific category or product. To do this, you need to select the right 'Request Path' for the category or product page. It will redirect users to the target URL, improving customer navigation. It prevents users from landing on generic pages instead of relevant content.
7. Can I create redirects for a Shopify store and Magento 2?
Yes, you can set up redirects for both Shopify and Magento 2. For Magento 2, you would create a 301 redirect through the Magento 2 backend. For Shopify, you would use the built-in URL redirect tools or update the htaccess file. It redirects traffic from one platform to another & improves overall site navigation.
Summary
Magento 2 custom redirect simplifies the process of redirecting an old URL into a new one. It helps you:
- Ensure that visitors are always directed to the right pages.
- Improve SEO and enhance user experience.
- Maintain a smooth browsing experience for your users.
- Handle URL changes, prevent 404 errors, and maintain smooth navigation for customers.
- Ensure a permanent transfer of link equity.
Explore Magento hosting plans to manage & optimize your store with a custom redirect.