Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Hello,
I am trying to redirect users to the homepage after they successfully reset their password in my Shopify store. I have attempted various methods, including JavaScript for client-side redirection, but haven't been successful.
Can anyone guide me on how to achieve this, any relevant documentation, or resources?
Thank you for your help!
Solved! Go to the solution
This is an accepted solution.
Hi @anup125
To redirect the customer once the password is updated you can add the below code In main-reset-password.liquid or a similar file or you can check which file is called in the customers/reset_password.json Check these screenshots: https://prnt.sc/fCn--aO0mcpV , https://prnt.sc/TMFM-AgJTjm-
{%- form 'reset_customer_password' -%}
<input type='hidden' name='return_to' value='/pages/contact'>
This is an accepted solution.
It works, Thank you soo much
This is an accepted solution.
Hi @anup125
To redirect the customer once the password is updated you can add the below code In main-reset-password.liquid or a similar file or you can check which file is called in the customers/reset_password.json Check these screenshots: https://prnt.sc/fCn--aO0mcpV , https://prnt.sc/TMFM-AgJTjm-
{%- form 'reset_customer_password' -%}
<input type='hidden' name='return_to' value='/pages/contact'>
This is an accepted solution.
It works, Thank you soo much
@Huptech-Web Thank you for this, was looking for a way to redirect customers once they've established their password for the first time, back to the storefront - but it doesn't seem to be working. They're still going to their account page. I set the code exactly as you have it in the main-reset-password.liquid file, to the main site URL. Tried a straight slash and the full URl but still getting the account page.
Any thought? Thanks!
Hey Community 👋 Did you know that March 15th is National Everything You Think Is W...
By JasonH Apr 1, 2025Discover how to increase the efficiency of commerce operations with Shopify Academy's l...
By Jacqui Mar 26, 2025Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025