Remove /Pages from URL my store

grayer
New Member
1 0 4

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.

Replies 161 (161)
Lisa
Shopify Staff (Retired)
Shopify Staff (Retired)
260 3 69

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

Mike_Hanley
Shopify Partner
1 0 0

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!

Lizzy
Shopify Staff (Retired)
Shopify Staff (Retired)
469 57 176

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

RuthH
Tourist
6 0 9

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?

Jason
Shopify Expert
11099 217 2256

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.

★ I jump on these forums in my free time to help and share some insights. Not looking to be hired, and not looking for work. http://freakdesign.com.au ★
RuthH
Tourist
6 0 9

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

Simon_Huang
Shopify Partner
1 0 0

Did you try it and see if it works?

I just did but it didn't work 😞

 

RuthH
Tourist
6 0 9

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.

mbrady23
New Member
1 0 5

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.

MarkZanghi
Tourist
3 0 3

Hey @mbrady23  any update on this as I'm having the same frustration and seeing so many users saying the same. My SEO folks are so frustrated with this.

 

@Lizzy can you please confirm if there is anything further on removing the unnecessary /pages/ slash? Thank you!

Lizzy
Shopify Staff (Retired)
Shopify Staff (Retired)
469 57 176

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

STREEFI
New Member
1 0 2

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

ukatocreaitons
New Member
1 0 0

Where do I add this code please?

 

POST /admin/redirects.json{
  "redirect": {
    "path": "/about-us",
    "target": "/pages/about-us"
  }
}

 

Jason
Shopify Expert
11099 217 2256

@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

 

★ I jump on these forums in my free time to help and share some insights. Not looking to be hired, and not looking for work. http://freakdesign.com.au ★
FelixLux
Tourist
8 0 12

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

timb
New Member
1 0 10

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.

MarkZanghi
Tourist
3 0 3

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!

PW12345
New Member
1 0 1

Same issue here, Please fix asap

b2
Shopify Partner
9 0 10

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