On this page
What this issue is
A password reset link is the one-time URL in the email a user gets after clicking "Forgot password". It carries a secret token. When the user clicks it, your app checks the token and shows a form to set a new password.
The issue is when the email arrives but the link does not work. The user sees a 404, an "invalid or expired token" message, a blank page, a login loop, or a different domain such as a staging site. This is different from the email never being sent (CNV-289).
Why it costs you leads or sales
Users who request a reset are already trying to log in. They are existing customers or trial users with intent. If the link fails, many give up, open a support ticket, or sign up again with another address. For a SaaS product that means lost trial conversions, churn and support load.
- Forgot password formUser enters email
- Reset email arrivesLink is in the message
- Click reset linkToken invalid, 404 or wrong domain
- Set new passwordNever reached
- Logged inUser gone or at support
The email arrives, but the link fails, so the user never sets a password or logs in.
Common causes
| Cause | What the user sees | Where to look |
|---|---|---|
| Email security scanner opens the link first | Token already used or expired | Single-use tokens consumed by a GET request |
| Token lifetime too short | Expired message within minutes | Auth settings, server time and time zone |
| Wrong base URL in the email | Staging, localhost or old domain | APP_URL, site URL or email template config |
| Email tool rewrites or wraps the link | Redirect error or stripped token | Click tracking settings in the email provider |
| Route missing or blocked | 404 or 403 page | Router, caching, firewall rules |
| Redirect drops the token | Login page or empty form | HTTP to HTTPS or www redirects |
| Multiple requests, older token invalidated | Older email stops working | Token storage logic |
How to check if your site has it
Request a reset with a real test account
Use an inbox you control, ideally one on Gmail or Outlook as well as a company address, since corporate filters behave differently.
Hover over the link before clicking
Check the domain, the path and that the token is in the URL. Look for localhost, staging domains or a click-tracking domain.
Click it once and complete the reset
You should land on a set-password form, then be able to log in with the new password.
Click the same link again
A used link should show a clear message with a way to request a new one, not a crash or blank page.
Test on mobile and in a private window
Links often open in an in-app browser without cookies. The reset should not depend on an existing session.
Test after a delay
Wait for the token lifetime to pass and confirm the expiry message is clear.
The user clicks the link and gets an error instead of the set-password form.
How to fix it
Fix the base URL
Make sure the app builds reset URLs from your production domain over HTTPS, not a staging or localhost value.
Turn off click tracking on reset emails
In your email provider, disable link tracking or rewriting for transactional messages so the token is not altered.
Extend the token lifetime
Use a sensible window, such as one hour or more, and check server time zones so expiry is not calculated wrongly.
Make the link safe against scanners
Do not consume the token on a GET request. Show the form on GET and invalidate the token only when the new password is submitted by POST.
Keep the token through redirects
Make sure HTTP to HTTPS and www redirects preserve the path and query string.
Show a helpful error
For expired or used tokens, offer a button to request a new link.
Check Settings > General
WordPress Address and Site Address must both be your live HTTPS domain, or reset links point to the wrong place.
Check the email plugin
If an SMTP or marketing plugin rewrites links, turn off tracking for password reset messages.
Exclude the login page from caching
Make sure wp-login.php and your custom reset page with action=rp are not cached or blocked by a security plugin.
Check the primary domain
In Settings > Domains, set the correct primary domain so account emails link to it.
Review the customer account email template
In Settings > Notifications, open Customer account password reset and check the link variable is unchanged.
Test in a private window
Shopify reset links are single use, so request a fresh one for each test.
Build URLs from config
Read the base URL from an environment variable and set it correctly in production.
Split GET and POST
GET validates the token and shows the form. POST sets the password and deletes the token.
Store expiry in UTC
Compare timestamps in UTC to avoid early expiry across time zones.
app.get('/reset/:token', async (req, res) => {
const record = await findToken(req.params.token);
if (!record || record.expiresAt < new Date()) {
return res.status(410).render('reset-expired');
}
res.render('reset-form', { token: req.params.token });
});
app.post('/reset/:token', async (req, res) => {
const record = await findToken(req.params.token);
if (!record || record.expiresAt < new Date()) {
return res.status(410).render('reset-expired');
}
await setPassword(record.userId, req.body.password);
await deleteToken(req.params.token);
res.redirect('/login?reset=1');
});Broken
- Link points to a staging domain
- Email tool rewrites the URL
- Scanner opens it and burns the token
- User sees a blank or 404 page
Fixed
- Link uses the live HTTPS domain
- Tracking is off for reset emails
- Token is consumed only on password submit
- Expired links offer a new request
How to confirm it's fixed
- The link in the email uses your production domain and HTTPS
- Clicking it shows the set-password form
- The new password works on the login page
- Reusing the link shows a clear message and a request-new-link option
- The flow works in a private window and on mobile
- The flow works for Gmail, Outlook and a company inbox
- Server logs show no GET requests consuming the token
How to prevent it happening again
Reset links break after changes to domains, email providers, redirects, caching rules or auth libraries. Add the reset flow to your release checklist and test it after any of these changes. Keep reset emails out of click tracking. Log reset errors so you notice a rise in invalid-token responses.
0:00
User requests a reset
0:02
Email arrives and the company scanner opens the link
0:03
Token is marked used by the GET request
0:05
User clicks and sees invalid token
0:06
User opens a support ticket or leaves
How FunnelGuard handles this
FunnelGuard detects this issue only partly. Its check is email_link: it runs the reset journey on a schedule, confirms the email reaches the test inbox, and checks that the link in the email can be opened and loads rather than returning an error. A failure is re-checked from a second region before one alert goes out with a screenshot and a likely cause.
It does not cover every real-world case. It does not reproduce a corporate email scanner consuming a single-use token, test every inbox provider or mobile in-app browser, or judge whether your expiry window suits your users. It also does not complete the password change with a real account unless you have set up a test account for it.
The Free plan includes 1 site, 2 journeys and daily checks with no card. Paid plans have a 3-day free trial.
Questions people ask
Why is my password reset link not working?
The usual causes are an expired or already used token, a link built on the wrong domain, an email tool rewriting the URL, or a redirect that drops the token. Open the link from a real email and read the URL it lands on to see which one applies.
Why does my password reset link say expired immediately?
Either the token lifetime is too short, server time zones are mismatched, or an email security scanner opened the link before the user did. Store expiry in UTC and consume the token only when the new password is submitted.
Why does the reset link go to the login page?
A redirect rule or auth guard is probably dropping the token or requiring a session. The reset route must be public and any HTTP, HTTPS or www redirect must keep the path and query string.
How do I stop email scanners from invalidating reset links?
Do not use the token on a GET request. Show the form on GET and invalidate the token only when the form is submitted by POST, so a scanner opening the link does no harm.
How do I test a password reset flow?
Request a reset to a real inbox, check the link domain, click it, set a new password and log in. Then reuse the link and test on mobile and in a private window.
Why does my reset link open localhost or a staging site?
The app builds the URL from a wrong base URL setting. Set the production domain in your environment or site settings and send a fresh test email.
Can FunnelGuard monitor my password reset link?
Partly. It checks that the reset email arrives and that the link in it opens without an error. It does not simulate email scanners or every inbox and device, so test those by hand.