Preventing double redirects from subsidiary domain to primary domain and then to URL Redirect

Topic summary

Migration to Shopify with two domains: primary herringshoes.co.uk and secondary herring-shoes.com. ~30,000 URL redirects were created via GraphQL to map old paths to new Shopify paths (e.g., /barker-shoes to /collections/barker-shoes).

Issue: When a SERP (search engine results page) links to herring-shoes.com/barker-shoes, Shopify first performs a domain redirect to herringshoes.co.uk/barker-shoes, then applies the URL redirect to herringshoes.co.uk/collections/barker-shoes, resulting in two 301 (permanent) redirects.

Impact: Customer experience is fine, but the double 301 may waste crawl budget and dilute SEO signals, raising concerns from their SEO consultant. Single 301 occurs only when the old URL is on the primary domain.

Request: Seek a Shopify setting or method to streamline to a single redirect directly from herring-shoes.com/barker-shoes to herringshoes.co.uk/collections/barker-shoes.

Status: No solution or configuration identified yet in the discussion; question remains open.

Summarized with AI on December 15. AI used: gpt-5.

tl;dr - any way to make Shopify combine domain and URL redirects into one operation rather than 2 redirects?

*********

Detail:

(Note that the forum unhelpfully hid all the URLs in my post below, for reference I am talking about:

  • herringshoes dot co dot uk/barker-shoes
  • herring-shoes dot com/barker-shoes
  • and the new Shopify url which is herringshoes dot co dot uk/collections/barker-shoes

…and I have used these for clarity)

We have recently migrated to Shopify from a custom platform.

On the old platform, we had herring-shoes.com and herringshoes.co.uk running concurrently, for legacy reasons.

Now we are on Shopify, our PRIMARY domain is herringshoes.co.uk, and we added herring-shoes.com as a secondary domain.

I created about 30,000 URL Redirects, to ensure a smooth (ish) transition from the old URL structure to a Shopify URL structure (obviously this was done with GraphQL). With a few hiccups, this worked fine.

The issue I now have is for redirection from an old URL on herring-shoes.com to a new URL on our new Shopify store.

For example, we had a page listing all of our products for a vendor called Barker Shoes on both herringshoes dot co dot uk/barker-shoes and herring-shoes dot com/barker-shoes. On Shopify, the new page for that is herringshoes dot co dot uk/collections/barker-shoes.

All is fine for SERPs that have herringshoes dot co dot uk/barker-shoes - there’s one 301 redirect, user goes straight to herringshoes dot co dot uk/collections/barker-shoes. All good, SEO juice preserved.

It’s a problem when the SERP is for herring-shoes dot com/barker-shoes. Shopify redirects the domain first, and only then looks for any URL redirects, so two 301s happen: the first one redirects herring-shoes dot com/barker-shoes to herringshoes dot co dot uk/barker-shoes, and only then does Shopify perform the URL redirect from herringshoes dot co dot uk/barker-shoes to the final destination of herringshoes dot co dot uk/collections/barker-shoes.

This is all fine from the POV of the customer, it’s smooth and they see what they expected to see, a collection of the shoes they searched for.

From an SEO point of view, this is less ideal. Two 301s eats up crawl budget, dilutes SEO and my SEO consultant is not happy, and I much prefer to keep them happy.

Before I go into a deep dive of research for a code-based custom app solution, is there any setting (that I have so far missed) to get Shopify to redirect straight from herring-shoes dot com/barker-shoes to herringshoes dot co dot uk/collections/barker-shoes ?

Having a secondary domain is no good - this whole thing is about SEO, we want one primary domain only. Shopify does not allow creation of URL redirects with an absolute domain, ie, I cannot create a redirect from https://herring-shoes dot com/barker-shoes to /collections/barker-shoes

Many thanks,

G

Just my 2 cents and a tiny testing:

You can create a redirect like
/barker-shoes → https://herringshoes.co.uk/collections/barker-shoes

If you have your .com set up as “redirect domain” it makes Shopify want to redirect to the primary domain first and only then consider any redirect rules you may have.

With alias domains redirection chain may be shorter.

However in my short test with redirect like above I see:
.co.uk/barker-shoes → .co.uk/collections/barker-shoes takes single 301

.com/barker-shoes → .co.uk/collections/barker-shoes takes:

  • if .com set up as alias it takes one 302 (but adds the shpxid parameter) and one 301

  • if .com set up as redirect, it takes two 301.

Interesting that if you do the same redirect in a different shop, it takes single 301.
So, if your .com be a separate store with a redirect rule as above,
.com/barker-shoes → .co.uk/collections/barker-shoes unexpectedly takes single 301 :slight_smile:

1 Like

That’s an interesting observation.

I think a 302 then a 301 is probably worse from an SEO viewpoint, but good to know.

G

Highly likely.

However, the idea about doing redirects at another store?
Since you’ve created them programmatically anyway…

Oh I see, so I’d be setting up a store to do nothing except, in essence, just be an .htaccess file.

It’s a good idea, although it does mean paying for another Shopify instance.

There’s also the issue of unhandled 404s - the customer would just be left stranded on my ‘htaccess’ store, leaving me with the option of a link that just says ‘sorry this isn’t our actual shop please go here’ and/or a clunky js redirect, or actually connecting this shop up to our back office systems and populating it with products, maintaining it properly etc etc. A second domain with the same content would also dilute our SEO rankings.

The proper fix here is to make the built-in domain redirection take account of url redirects. If there isn’t a way to do it, then there isn’t a way to do it - I’ll just let google update its SERPs and re-learn my site structure.

Many thanks,

G