The original poster wants to redirect /collections to /collections/all because they don’t want visitors accessing the collections overview page, which they consider redundant and don’t want to style.
Initial Misunderstanding:
Early responses suggested changing navigation links, but this doesn’t prevent direct URL access or search engine indexing of the unwanted page.
Working Solutions:
Several JavaScript-based redirects were proposed and confirmed working:
Basic redirect: Add JavaScript to theme.liquid (before </body>) checking if window.location.pathname matches /collections or /collections/ and redirecting accordingly
Comprehensive solution: One user shared code redirecting both /collections and /products (with/without trailing slashes) to desired destinations
Alternative approach: Create a custom collection named “all” which overwrites Shopify’s default, eliminating the need for code in some themes
Key Limitation:
Shopify’s built-in redirect feature doesn’t work for default pages like /collections, requiring JavaScript workarounds.
SEO Note:
While JavaScript redirects aren’t true 301s, Google Search respects them as permanent redirects, though indexing updates may take several days.
Summarized with AI on October 31.
AI used: claude-sonnet-4-5-20250929.
If you want your ‘STORE’ to link to all of the products available on your store as opposed to all of the collections on your store, you can make this change within your navigation settings.
By going to online store > navigation > click on the menu you want to edit > click the edit button beside menu item you want to edit >change the link to ‘All Products’. As shown below:
Once you do that, be sure to save your changes. If there is anything else I can help you with, please let me know.
Thanks, but that isn’t quite what I was looking for. Even though the navigation bar links to ‘All Products’ if a visitor was to navigate to www.mysite.com/collections/ they would still see a page that I don’t want them to see.
I have no need for the page, so, therefore, do not want to spend time having to style it when it is redundant.
Is there a way that I can redirect all traffic that tries to reach /collections/ ?
Did you ever get an answer to this? Im not sure why all the Shopify members think a solution is to hide the links…people can still access the page…google can still index them…
Hi Diego, this solution definitely helps when someone lands on /collections. However, it does not help when someone adds the ‘/’ at the end, e.g., /collections/
Thank you. Each of our collections represent products that are exclusive for a certain customer. We don’t want people to get in a situation where they can see all of our collections. That would be bad.
Do something like following in your theme.liquid by adding a block containing following,
// redirect '/collections' or '/collections/' or '/products' or '/products/' to '/pages/our-product-range'
// Shopify navigation redirects won't work for these urls as they are Shopify default urls not controlled by the theme
if (window.location.pathname === '/collections' || window.location.pathname === '/collections/' || window.location.pathname === '/products' || window.location.pathname === '/products/') {
window.location.href = '/pages/our-product-range';
}
This worked for me, except I didn’t even need to add any code to the theme.liquid file for my theme.
By naming a collection as “all” it over wrote Shopify’s default “all” collection. Now instead of all the products showing if I user goes to the top level of the collections, it shows the products that I want to show.
OK, thanks! But that didn’t work for me. I had to do it as I described above. Weird, that some stuff works for some sites, and not others … have seen that with other stuff, too …