Shopify themes, liquid, logos, and UX
Hi,
Is there any way to remove /Pages from URL.Currently, my page URL is ".com/pages/about-us" i want to change to ".com/about-us".I tried URL redirect method Navigation settings and edit the code from theme.liquid to like this,
{% if template contains 'collection' and current_tags %}
<meta name="robots" content="noindex" />
<link rel="canonical" href="{{ shop.url }}{{ collection.url }}" />
{% else %}
<link rel="canonical" href="{{ canonical_url }}" />
{% endif %}
Still it did not work. Please help me.Thank you.
Hi, there!
Lisa here from the Social Care Team. The navigation redirect will not help with what you're trying to achieve by removing 'pages' in your URL. Please try the instructions in this document here to update the path to the target URL.
When you provide a full URL as the value of the path property, it will be saved as an absolute path without the domain. For example, "path": "http://www.johns-apparel.com/springwear" will be saved as "path": "springwear".
You then need to create a manual redirect by allocating this path to its target:
POST /admin/redirects.json
{
"redirect": {
"path": "/about-us",
"target": "/pages/about-us"
}
}
Hopefully, this will help mask the 'pages' and allow you to just show .com/about-us when sharing your page.
Best of luck!
- Lisa
Lisa | Social Care @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit the Shopify Help Center or the Shopify Blog
Hi Lisa,
Is there a way to add/edit the manual redirect to a current theme redirect.json file?
Usually I am in the code backend of our theme and make additions/mods there.
I would be looking to add:
{
"redirect": {
"path": "/returns",
"target": "/pages/returns"
}
}
Thanks!
Hey, Mike!
Lizzy here, I’m a Shopify support Guru.
The redirects that Lisa has explained here work as a back end alternative to creating a URL redirect under Admin -> Online Store -> Navigation -> URL Redirect. The steps for the latter are explained in this guide here.
How these redirects work is that if the URL leading to storename.com/returns was broken, you could use these steps to set up a redirect that sent storename.com/returns to storename.com/pages/returns, where the page is currently hosted. This is useful if you're migrating to Shopify from another platform and need to use redirects to make sure any old links to your site still direct to the correct information. While you can set up redirects without "pages" in the path, you cannot alter the actual URL of the page to remove "pages."
I hope this helps with what you're looking to set up! Please feel free to let me know if you have any further questions about this.
Thank you,
Lizzy
Lizzy | Social Care @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit the Shopify Help Center or the Shopify Blog
Hi Lizzy,
We are trying to do the same with our Shopify sites. Our SEO gurus are not happy /pages, /blog, /collections, /products etc has to be within the URL. I can't say we're too happy either (as I can see is a theme across multiple forums).
Are you saying there is no way at all to remove this is you are hosted with Shopify?
Are you saying there is no way at all to remove this is you are hosted with Shopify?
Correct. The resource makers like /pages, /collections, etc can't be removed.
Hi Jason,
Thank you for your reply.
On the back of a lot of research on this, we have found this article. Can you confirm this could work and shouldn't harm the Shopify setup?
https://paulnrogers.com/how-to-change-the-product-url-structure-in-shopify/
Cheers
Did you try it and see if it works?
I just did but it didn't work 😞
To me it seems crazy that this has been an issue/request from Shopify users for quite some time now (I've noticed in multiple other Shopify forum chats), but there seems to be no word on ever changing it. Disappointing to say the least.
Don't get me wrong - I love Shopify, but there are a fair few SEO related issues that can't be changed, which is ultimately frustrating when trying to up search rankings.
I also find it crazy that this is an unfixable issue. I was on with chat support asking about this issue and found this thread while I was awaiting a reply. I just started my store on Shopify so I'm definitely going to cancel and request a refund. It is unquestionably sub-optimal to have a longer URL like the ones forced upon Shopify stores - if they won't prioritize my company's success, I'm not staying on the platform.
Hi @MarkZanghi.
At this time, there is not a way to remove the /pages, /products, etc. sections of your URL. This section of the URL path is used to access the different areas of your store.
I understand that this is a feature that would be useful to many of you, which is why I have made sure to pass along a feature request to our development team. I also wanted to thank you for taking the time to share your thoughts and feedback on this with us, so that we can keep working on ways to improve Shopify!
Thank you again,
Lizzy.
Lizzy | Social Care @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit the Shopify Help Center or the Shopify Blog
Hello,
we got the same problem. We have, as example, /pages/agb but we want only /agb. So, how can we remove this /pages?
It is not possible that this is not working. There must be a solution for this. And redirecting is no option.
greetings
Where do I add this code please?
POST /admin/redirects.json{ "redirect": { "path": "/about-us", "target": "/pages/about-us" } }
@ukatocreaitons wrote:Where do I add this code please?
...
That code you've posted is for the API so won't be code you _paste_ into your store. There's already a section in the Admin to create your url redirects if you need them. Some info on that here:
https://help.shopify.com/en/manual/sell-online/online-store/menus-and-links/url-redirect
Hi Shopify Team,
I'm an SEO and just wanted to help a friend optimising his shop, when I stumbled across this issue.
Not giving customers a solution out of this suboptimal (to say the least) url structure is a clear flaw in your product. Please do yourselves + customers a favour and fix it soon.
Sincerely,
Felix
I'm a web developer wishing to set up a store with Shopify. I'm gobsmacked this is even a thing. I want my url to be www.xx.com/electronics/tvs for example, not www.xxx.com/collections/electronics and www.xxx.com/collections/tv
This really makes little sense from a SEO perspective. Can Shopify surface a url rewriting config page so I can have more control over the site structure.
Timb -- couldn't agree more. And thanks for hopefully getting this back on Shopify's radar. It's something I've been puzzled by for quite a while.
I assume there's a logical reason for this since there's no way Shopify just overlooked it. A solution to this should be figured out ASAP. I encourage the many others I'm sure are are here for the same issue to comment and get this flagged to the top!
You would think this issue countless merchants dislike would've been fixed by now. This issue was brought to attention way before this post. It's crazy that this was even implemented at all... Whoever had that idea must have some control issues? IDK... I just think there should atleast be SOME sort of option to change it. Give us a option! IDC if it gives me a headache but give me a way! Lol
User | RANK |
---|---|
210 | |
147 | |
68 | |
46 | |
41 |
Thanks to all Community members that participated in our inaugural 2 week AMA on the new E...
By Jacqui Mar 10, 2023Upskill and stand out with the new Shopify Foundations Certification program
By SarahF_Shopify Mar 6, 2023One of the key components to running a successful online business is having clear and co...
By Ollie Mar 6, 2023