301 Redirect of collections/all Page

New Member
31 0 0

Hi,

We've been updating the handles (URL's) for a lot of our collections and this works fine:

e.g - collections/bags changes to collections/nice-bags and a redirect is put in place which works fine.

But when we try to change collections/all to collections/all-my-products, the new page (all-my-products) works fine but the 'all' page still exists with no redirect - even though we have put a redirect in place when changing the handle. So it seems like we have 2 pages for the one collection, although the original (all) does not behave as expected, for instance if you add content (Lorem ipsum...) to the page in the admin section it only gets applied to the new version (all-my-products) so it looks like the 'all' page is slightly broken in a sense.

Basically what we want to do is have the 'all' collection behave like all the others where the redirect works and we're not left with 2 pages.

Thanks,
Al.

0 Likes
Shopify Staff
Shopify Staff
524 1 68

Hey, Al!

My name is Alex, I'm a guru here at Shopify!

Ah, I see - sorry to hear that you're running into an issue there.  Redirects within the Shopify system only work if the link would ordinarily lead to a 404, which is fine for most products and collections that have had the handle changed - but some urls are reserved for system purposes.  Collections/all is one of these urls; it's put aside so that, no matter what, you can always have a menu link to all your store's products by selecting All Products for the link option in your navigation menu - even if you don't have any collections set up at all, that will return a page with all of the published items in your store.

You're absolutely able to create a new collection that brings in all the products on your store, but you're not able to redirect the url collections/all, I'm sorry to say.  If you'd like to discuss your navigation strategy in more detail, please do reach out to us and we'll be happy to talk it over with you!

Hope that's helped!  Please feel free to give us a call or start a live chat at any time, we're open 24/7 for your convenience and always happy to assist!

Cheers,

Alex | Shopify Guru

0 Likes
New Member
31 0 0

Hi Alex,

Thanks for the reply, that clears it up for me.

 

Al.

0 Likes
Highlighted
Shopify Partner
1 0 0

Is there really no way to set 301 redirects for all product pages under the shopify generated "collections/all" collection.  The best thing to do would be to deactivate the "all" collection.    

 

This is the only thing I can think about doing, but it's not a great idea to use http-equiv="refresh"

 

{% if collection.url == '/collections/all' and template == 'product' %}
    {% assign redirectUrl = '/products/' |  append:product.handle %}
    <meta name="robots" content="noindex">
        <meta http-equiv="refresh" content="0;url={{redirectUrl}}">
{% endif %}
0 Likes