I have a store with a theme called " dawn " its url is www.westcoastbathhouse.shop
I want my store logo in the header to link to www.westcoastbathhouse.com
Hi @WCBH
Here are the steps to change the logo link in the Dawn theme:
- Go to Shopify Admin → Online Store → Themes
- Click … (three dots) on your active Dawn theme → Edit code
- Search for header.liquid
- Usually located at:
sections/header.liquid
- Usually located at:
- Find this line:
<a href="{{ routes.root_url }}" class="header__heading-link link link--text focus-inset">
- Replace the
hrefwith your custom URL:
<a href="https://www.westcoastbathhouse.com" class="header__heading-link link link--text focus-inset">
- Click Save and test your store.
If you can’t find this exact line, send me the logo section code from header.liquid, and I’ll help you locate the correct place.
Best regards,
Devcoder ![]()
Hey @WCBH
The above approach is right, just two things to get it working cleanly. First, that line actually appears twice in Dawn’s header.liquid, not once (one for the “middle center” logo position, one for all the others), so change both or the update will only show on certain layouts. Find each instance of:
<a href="{{ routes.root_url }}" class="header__heading-link link link--text focus-inset">
and swap the href to your site:
<a href="https://www.westcoastbathhouse.com" class="header__heading-link link link--text focus-inset">
Second, since it’s an external site, you may want the logo to open it in a new tab so shoppers aren’t pulled out of your store mid browse. If so, add target and rel to it:
<a href="https://www.westcoastbathhouse.com" target="_blank" rel="noopener" class="header__heading-link link link--text focus-inset">
Save and test on both desktop and mobile to confirm both logo positions point where you want. That’s all it takes.
Hope that helps! If it did, a Like and Marking it as Solution goes a long way and helps others find the fix faster too.
Best,
Moeed
Hi @WCBH
Just a note, what you want would break a pattern that the most of people are used to: that logo leads to home/index page. With your change, they will get confused for sure and you do not want that. Another thing is, if you do make that change how would customers get back to that page? Changing domain in address bar?
I pasted the code into this shareable google doc. If you hihglight the sections I can go in and change it CODE - Google Docs
Thank you so much for the help
To change your logo link on the Dawn theme, you just need to update a single line in your theme code:
-
Go to Online Store > Themes, click the three dots (…) next to Dawn, and select Edit Code.
-
Open the
header.liquidfile (under the Sections folder). -
Search for:
href="{{ routes.root_url }}" -
Replace
{{ routes.root_url }}with your URL:href="https://www.westcoastbathhouse.com" -
Click Save.
if you see this snippet twice in the file, change it in both places so it updates both the image and text logo links).
Hello @WCBH ,
Here are the step-by-step instructions:
Step 1: Open the Header File
- Navigate to Online Store > Themes.
- Click the three dots (…) and select Edit code.
- Open the header.liquid file (located under the Sections folder).
Step 2: Locate and Replace the Link Code
-
Press Ctrl + F (Windows) or Cmd + F (Mac).
-
Search for: routes.root_url
-
You should see a line of code that looks similar to this:
<a href="{{ routes.root_url }}" class="header__heading-link link link--text focus-inset"> -
Change {{ routes.root_url }} to your custom URL: https://www.westcoastbathhouse.com.
The updated line should look like this:
<a href="https://www.westcoastbathhouse.com" class="header__heading-link link link--text focus-inset">
Step 3: Save Your Changes
- Click the Save button in the top right corner.
- Visit your site (www.westcoastbathhouse.shop) and test the logo.
Hope this helps!
Thanks!