Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Hi, all! I'm getting the common error message "Page is redirecting to an unsupported URL". I have the the instructions for how to troubleshoot (below). Where do I update the Javascript code in the Shopify theme? I've gone to "Online Store" -- Theme -- Customize -- Edit Code. I haven't found anything that matches the troubleshooting below.
Troubleshooting Instructions
To resolve this issue, you need to fix the JavaScript code in your Shopify theme. Instead of using “window.location.href =”, you should use “window.parent.location.href =”, or use a reference to the “window.Shopify.designMode” variable in JavaScript.
Thanks so much!
Search for Redirect Code in JavaScript Files:
Update the Redirect Code:
Check Inline JavaScript in Liquid Files:
Save Changes and Test:
By following these steps, you should be able to fix the redirection error and ensure proper functioning of redirects within your theme’s code.
Need seamless customer support on your store? Check out the Debales AI Chatbot on Shopify! Guide visitors through every step—let’s chat!
Please let us know if this reply was helpful by giving it a Like or marking it as a Solution.
Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025Discover opportunities to improve SEO with new guidance available from Shopify’s growth...
By Jacqui May 1, 2025