Remove /Pages from URL my store

New Member
1 0 1

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.

1 Like
Shopify Staff
Shopify Staff
259 2 41

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

1 Like
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!

0 Likes
Shopify Staff
Shopify Staff
332 36 65

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

0 Likes
Tourist
3 0 1

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?

0 Likes
Shopify Expert
9764 86 1511

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.

★ Winning Partner of the Build a Business competition. ★ http://freakdesign.com.au
0 Likes
Tourist
3 0 1

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

0 Likes
Shopify Partner
1 0 0

Did you try it and see if it works?

I just did but it didn't work :(

 

0 Likes
Tourist
3 0 1

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.

1 Like