Re: Bulk redirect wildcard

How can I create a wildcard redirect for duplicate URLs in my Canadian market?

Jackson_Cunnin2
Shopify Partner
113 0 17

When setting up my Canadian market in Shopify, I accidentally chose to use ‘subfolders’ which creates a duplicate of all our URLs for Canadians (adding “/en-ca/”). Unfortunately I only noticed this after a few months so a bunch of these pages have been indexed, linked to etc.

 

Now I want to change the setting so that we only have one URL. It’s an easy setting change in shopify, but all the /en-ca/ URLS go to 404s. Theoretically really easy to create some type of wildcard redirect, ie IF any url with /en-ca/, remove and redirect to the same url without /en-ca/

 

Anyone know how I can achieve this? Thanks in advance.

Replies 4 (4)

serhato
Shopify Partner
2 0 1

Hi, 

 

Could you find any solution for the issue?

 

I have something similar on my plate.

 

Cheers.

sarahpeacock
Shopify Partner
29 2 6

@serhato you should be able to an * (asterisk) as the wildcard character.

I didn't find official documentation on using a wildcard to redirect websites in Shopify, but it seems to be working for two of my Shopify sites and this StackOverflow comment says it works too.

 

 

@Jackson_Cunnin2, did you end up using an asterisk and creating redirects with a URL pattern?

Side note-ish — if the old format doesn't have any other websites linking to it, you can just use Google Search Console to reindex. Take a glance at the Google Search Central documentation for Crawling & Indexing , there are a few subsections that should help, if you haven't found an answer.

 

 

DutchDelight
Explorer
44 0 10

Asterisks don't work. There is an app, but why pay for an app when you should be able to do without an app..

mihaibravu
Shopify Partner
5 0 0

If they can charge you a buck why should they offer you a feature for free? Shopify knows its business better...