I have 2 domains for my store. The primary one works fine.. it sends the user to the homepage.
The second domain, I want to send a user to domain-specific page within my store. When I try to create a URL redirect in the admin, I get a “Path can’t be blank” error.
If I change the Redirect from to add a path (ie, http://www.example.com/example.htm) then it allows me to save the redirect. But customers wont go to a path in the url, they will just type the www.example.com in the browser and I need them to be redirected within the site to the example page I have created.
Also, is there a way to have the redirect keep the original domain name instead of changing to the primary domain?
TLDR: If you purchased the 2nd domain (that you’re trying to point to a specific page) via Shopify, then it’s not possible to redirect it to a specific page (it’ll just point to the homepage). If you purchased the domain via GoDaddy, then you can setup “domain forwarding” (https://ca.godaddy.com/help/forward-my-godaddy-domain-12123) to point it to the page you’re wanting it to go to.
You can not redirect the homepage to another page. Even if you set up a 2nd domain, it will still be treated as a domain to your store, so not possible to redirect it to a subpage.
To clarify, if I want my second domain to point / forward to a specific page on my website, should I delete the domain from my Shopify list?
I have a primary domain which points to my homepage and a second domain which is set to forward to a specific page in my shopify site, yet it is only working on mobile and not on desktop…on desktop it redirects to my primary domain.
Many thanks in advance!
To redirect a secondary domain to a specific page within your Shopify store, you can follow these steps:
For the secondary domain, where you want to send users to a specific page within your store, you may encounter an error message like “Path can’t be blank” when attempting to create a URL redirect in the Admin.
To resolve this issue, you can try using a third-party Shopify app like Easy Redirects by Aperitive to set up the desired redirection. This app should allow you to specify the exact path or page within your store that the secondary domain should point to.
If there is anything else I can help you with, please let me know.
You can add a little custom javascript to your site to make this work:
Go to Themes → Select 3 dot menu and select “Edit Code”
Open theme.liquid
Scroll down till you see
Add the following code substituting your URLs:
What this code is doing is when your main page loads it looks at the url and if it matches say your second domain, it will redirect the browser automatically to the domain and page of your choosing.
Hope this helps anyone else that comes along later.
I have the same problem (2 domains, but want one of them to directly link to a page of my shop, not to the homepage), both bought from shopify
I tryed to add the code you sent, updating it with my domains, but it still takes me to the homepage…
Should I also change the domain type in my domain parameters? It’s currently set up as redirect
I feel like currently, the code doesnt do the trick bc the url changes to my main domain before it even loads your code - but I’m not a professional in coding, so that might be wrong