Why isn't my URL redirect working properly on my product page?

The path is homepage - collection - product, the automate URL is https://dexshellstore.com/collections/waterproof-hats/products/beanie-fair-isle I wanna change it to https://dexshellstore.com/products/beanie-fair-isle and I used the URL redirection but it does not work. If I search for the this particular product it will works, but if I follow homepage - collection - product it does not work, could anyone give a hint to solve this problem please? Thanks in advance.

1 Like

Hi @BellaZheng if you tried shopify url redirection, it only works if you want to redirect broken url. So you should try with this piece of code (add to theme.liquid):


If you find my answers helpful, please mark resolved or like.

Hi I added the code and it does work!
However, this page is always refreshing, do you know how to solve this?
Please check out https://dexshellstore.com/products/beanie-fair-isle

Thanks in advance.

Hi Petrovic,

I have received two codes.

The one sent to my email works, but the page is always refreshing

The one reply in community did not work, please check out https://dexshellstore.com/collections/waterproof-hats/products/beanie-fair-isle

Hi @BellaZheng , let’s try this


If you find my answers helpful, please mark resolved or like.

Hi MarinaPetrovic,

Thanks for reply. The code still did not work. :disappointed_face:


Add this in your theme liquid, just before .

@BellaZheng

2 Likes

Thanks a lot!! @MarinaPetrovic

1 Like

Hi Marina

thank you for help

for me didnt work cause i need to redirect to external thank you page from wp , could you help for this plz

thank you

thank you so much