Blog / Redirecting a Shopify "/collections/all page"
Redirecting a Shopify "/collections/all page"
By default, Shopify includes a "/collections/all" page on every Shopify store. Sometimes you may want to redirect this page - here's a simple method with minimal code.
Shopify's URL structure is something that a lot of SEOs find challenging to work with. The /collections/all page can be a real strength - it's where all your products are housed, so often it's the most appropriate place to optimise for the highest level in your taxonomy. For many stores it can outrank the home page as it better fits buying intent.
That said, there may be times when you just don't want it to appear in search results. The site you are on now is built on Shopify for example, and there's no point in users being able to view it.
The problem is that you Shopify doesn't allow you to remove or redirect /collections/all using the usual methods. It's not a collection page you can delete, and setting up a redirect the usual way won't work.
There is a simple code solution though.
In your theme.liquid file, add this near the top:
{% if collection and collection.handle == 'all' %}
<meta http-equiv="refresh" content="0;url=/">
{% endif %}
This is set to redirect to the homepage at the moment, but updating it to another URL is easy enough - just replace "/" with the path.
-
How to add a ‘read more/less’ feature for text ...
On-page content is a major part of SEO, particularly when it comes to category pages. Without text, search engines can struggle to understand what a page is about, which can...
How to add a ‘read more/less’ feature for text ...
On-page content is a major part of SEO, particularly when it comes to category pages. Without text, search engines can struggle to understand what a page is about, which can...
-
Introducing PyGoogalytics
We've now made PyGoogalytics, our Python library for managing Search Console and Analytics data, publicly available for use by the SEO and data science community.
Introducing PyGoogalytics
We've now made PyGoogalytics, our Python library for managing Search Console and Analytics data, publicly available for use by the SEO and data science community.