Redirect category to another

Redirect category to another

September 2, 2026 · Illustrated author avatarBy Stefan Bogdanescu
Redirect category to another

Redirecting Magento Categories: A Comprehensive Guide

In Magento, redirecting categories is a common requirement for e-commerce websites, especially when dealing with complex category structures. In this post, we’ll explore how to achieve the desired outcome of redirecting from one category to another, with the ability to change the target category periodically through the admin interface.

Understanding the Requirement

You have a parent category that contains multiple sub-categories. When a user clicks on the parent category, you want them to be redirected to one of the child categories instead. Furthermore, your client wants this redirection behavior to be configurable in the Magento admin panel so they can change the target category as needed.

Can We Use Custom Layout Update?

The short answer is no. While the Custom Layout Update field allows for customizing the layout for specific pages or categories, it doesn’t provide the functionality required for redirecting a category to another one. This feature is more suited for modifying the page structure and display elements rather than for URL redirection.

Using URL Rewrite

The solution lies in using Magento’s built-in URL rewrite mechanism. To achieve this:

  1. Navigate to the “URL Rewrite Management” section under Catalog > URLs.
  2. Click on “Add New URL Rewrite”.
  3. In the Request Path field, enter your old category URL (the one you want users to click).
  4. Under Target Path, select “CMS Page” or “Custom URL”. If you choose CMS Page, you can create a new page in the CMS and set it as the target.
  5. Enter the new category URL or the CMS page ID in the Target URL field.
  6. Save your changes.

Redirecting from Admin Panel

To make this redirect configurable through the admin panel, you can create a custom attribute for the category to store the URL of the redirection destination. Here’s how:

  1. Go to Stores > Attributes > Manage Categories under Catalog.
  2. Click on “Add New Attribute”.
  3. Set the Attribute Code and Label accordingly (e.g., redirection_url).
  4. Choose “Text Area” as the Input Type.
  5. Under Default Value, enter a default URL or leave it empty if you don’t want any initial value.
  6. Save your attribute.

Next, in your category view or edit page:

  1. Use the new redirection_url field to store the destination URL for redirection.
  2. Update this value whenever the client wants to change the redirect target.

Conclusion

In Magento, redirecting a category to another can be accomplished through the URL Rewrite Management section and by creating custom attributes for storing redirection URLs. This approach allows you to easily manage redirects in the admin panel without needing to modify core files or use complex layouts.

Remember to always backup your data before making changes and test thoroughly on a staging environment first.

For more advanced Magento development tasks, consider reaching out to professional Magento developers at Laravel Company. We specialize in Magento e-commerce solutions and have the expertise to handle even the most complex redirecting requirements.

Catalog Themes Admin Configuration

Our network