All things Shopify and commerce
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?
Solved! Go to the solution
This is an accepted solution.
Hey @sancuscommerce
I recently answered a question similar to this in this thread: https://community.shopify.com/c/technical-q-a/redirect-with-dns-settings/td-p/2297744
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.
Cheers,
Stephen
★ Did my post help? If yes, then please like and accept solution. ★
https://stephens.world
[email protected]
This is an accepted solution.
Hey @sancuscommerce
I recently answered a question similar to this in this thread: https://community.shopify.com/c/technical-q-a/redirect-with-dns-settings/td-p/2297744
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.
Cheers,
Stephen
★ Did my post help? If yes, then please like and accept solution. ★
https://stephens.world
[email protected]
my dns is with route 53 on aws. It looks like I can configure an s3 bucket to do the redirect and use route 53 to point to the bucket. thanks!
Hi Stephen,
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!
Hey, @Alice_O_Connell
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.
Dirk | 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
Hello @sancuscommerce 👋
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.
There is a solution to this problem!
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 </head>
Add the following code substituting your URLs:
<!-- Below coded added to create a redirect when landing at napathefuncart.com
to send the user to the specific landing page -->
<script>
function redirecDomainToLandingPage() {
window.location.replace("https://www.yourdomain1.com/pages/thePageYouWant");
}
if(window.location.href == "https://yourdomain2.com/" || window.location.href == "https://www.yourdomain2.com/") {
redirecDomainToLandingPage();
}
</script>
<!-- END CODE ADDED -->
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.
Starting a B2B store is a big undertaking that requires careful planning and execution. W...
By JasonH Sep 23, 2024By investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024