Magento Password Reset Link

Magento Password Reset Link

July 23, 2026 · Illustrated author avatarBy Stefan Bogdanescu
Magento Password Reset Link

Are you facing password reset link issues on your multi-store Magento installation? You’re not alone! Let’s dive into a common scenario where the wrong domain name causes a Magento password reset to fail, and explore how to fix this issue.

Imagine you have two Magento stores:

  1. www.domain.com - Your retail store
  2. trade.domain.com - Your trade-specific store

When a customer requests a password reset from the trade.domain.com store, they receive a link like this:

http://trade.domain.com/customer/account/resetpassword/?id=12&token=84fb6f65548995191e526b815982bf23

However, when they click on it, they’re redirected to the login page with this frustrating error:

Your password reset link has expired.

The Trick: Swapping Domains

Interestingly, if you manually replace “trade” with “www” in the URL:

http://www.domain.com/customer/account/resetpassword/?id=12&token=84fb6f65548995191e526b815982bf23

The password reset works perfectly! This indicates that the domain name is being used incorrectly in the password reset link generation process.

The Cause: Incorrect Domain Configuration

This issue arises from how Magento handles multi-store configurations. By default, it doesn’t correctly associate the store-specific domains with their respective stores during password reset link creation.

To verify this, check your Magento admin panel:

  1. Go to System > Configuration.
  2. Expand General > General and click on Web.

You’ll see settings for “Unsecure Base URL” and “Secure Base URL.” Ensure these are configured correctly for each store view under the appropriate scope (Store View or Store View Scope).

The Solution: Fixing the Domain Mismatch

To resolve this issue, you have a few options:

If your stores aren’t heavily accessed and you’re comfortable with manual URL modification, you can manually replace “trade” with “www” in all password reset emails for customers registered under trade.domain.com.

However, this is an inefficient long-term solution.

Option 2: Custom Module Development

You can create a custom Magento module that intercepts the password reset link generation process and ensures it uses the correct domain name based on the store view context. This requires advanced knowledge of Magento’s core codebase but provides a clean, efficient solution.

For detailed guidance on creating customer modules, check out this comprehensive tutorial from Laravel Company.

Option 3: Use Magento’s Built-in “Set Store Domain” Feature

If you’re running Magento 2.4 or later, the platform has a built-in feature to set the store domain:

  1. Go to Stores > Configuration.
  2. Set your scope to the desired store view.
  3. Expand General > General and click on Web.
  4. Under “Base URLs,” enter the appropriate domain name for each field (“Unsecure Base URL” and “Secure Base URL”).
  5. Click Save Config.

This should ensure Magento generates correct password reset links.

In summary, Magento’s multi-store configuration can lead to incorrect domain names in generated password reset links. To fix this:

  • Verify your web base URLs are configured correctly for each store view.
  • Develop a custom module (advanced) or use the built-in “Set Store Domain” feature for Magento 2.4+.

Remember, always back up your database before making changes in the Magento admin panel. If you’re unsure about any modifications, consult with a professional Magento developer to ensure data integrity and system stability.

Happy troubleshooting!

API Configuration Customers Errors

Our network