All things Shopify and commerce
Hello developers & experts!
I have an issue which I cannot identify and I hope someone can help me with this.
For reference, our website URL is https://www.thecbdhut.co.uk/
When checking Ahrefs, For some reason, all of our product pages are showing a 404 error. It looks like the errored URL is using the H1 title. I am not sure what this issue is here and where I can find the issue to fix (in which code file and what to look for)
Please help if you can. I am sure it is a simple fix.
Here is a screenshot of the Ahrefs issue:
Thanks a lot!
Luke
The CBD Hut
Solved! Go to the solution
This is an accepted solution.
Hi @sweetgeezvapes,
It looks like there is space in product url (%20" - representing spaces). This structure is causing the 404 errors, as it doesn't match the actual URLs on your Shopify store.
-Verify Product URL Structure: Check the product URLs in Shopify. They should follow a structure like https://yourdomain.com/products/product-handle, where "product-handle" is a simplified version of the product title (usually lowercase, with hyphens instead of spaces).
-The URLs in the Ahrefs screenshot show a format like https://thecbdhub.co.uk/products/Dr%2... This structure seems incorrect, as it’s including spaces (%20) and full titles instead of simplified handles.
-Review your theme's product template files (e.g., product.liquid, main-product.liquid) to ensure the URL generation is using {{ product.url }} or {{ product.handle }}, not {{ product.title }}.
Once you verify that the URLs on your Shopify site are correct, update your sitemap (Shopify generates it automatically at https://yourdomain.com/sitemap.xml).
I hope this helps! If it does, please like it and mark it as a solution!
If you need further assistance, feel free to reach out!
Regards,
Sweans
This is an accepted solution.
Hi @sweetgeezvapes,
It looks like there is space in product url (%20" - representing spaces). This structure is causing the 404 errors, as it doesn't match the actual URLs on your Shopify store.
-Verify Product URL Structure: Check the product URLs in Shopify. They should follow a structure like https://yourdomain.com/products/product-handle, where "product-handle" is a simplified version of the product title (usually lowercase, with hyphens instead of spaces).
-The URLs in the Ahrefs screenshot show a format like https://thecbdhub.co.uk/products/Dr%2... This structure seems incorrect, as it’s including spaces (%20) and full titles instead of simplified handles.
-Review your theme's product template files (e.g., product.liquid, main-product.liquid) to ensure the URL generation is using {{ product.url }} or {{ product.handle }}, not {{ product.title }}.
Once you verify that the URLs on your Shopify site are correct, update your sitemap (Shopify generates it automatically at https://yourdomain.com/sitemap.xml).
I hope this helps! If it does, please like it and mark it as a solution!
If you need further assistance, feel free to reach out!
Regards,
Sweans
Thank you Sweans!
I will look into the issue and if no results, I will get back in touch.
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