Anchor Links not working

Anchor Links not working

alexarabini
Visitor
1 0 0

I'm trying to build a one page website with anchor links at the top that are mobile friendly plus I want to forward alias domains to select anchor links for poeple to find that section faster and so far I've got it working on the desktop but on safari/chrome the anchor links are not working. Can anyone help?

 

primary domain is 601fremont.com

and then I need backstagebarlv.com linked to the2nd custom liquid

and fremontcountryclublv.com linked to the 3rd custom liquid

 

Super debating on moving to Squarespace but trying to keep my client on this platform if I can

Reply 1 (1)

rajweb
Shopify Partner
775 66 142

Hey @alexarabini ,

Sure! To fix anchor links not working on mobile Safari/Chrome after domain forwarding:

1. Use JavaScript Redirects – On each alias domain, create a Shopify page with this code:

<script>window.location.href = "https://601fremont.com#backstage";</script>

(Change the anchor for each domain.)

2. Fix Scroll on Mobile – Add this to your CSS to handle sticky headers:

html { scroll-padding-top: 100px; scroll-behavior: smooth; }

Let me know if you want help editing the theme or setting up the alias domains properly! Please Reach out me thanks!

Best,

Rajat

Shopify Expert

Rajat | Shopify Expert Developer
Need a reliable Shopify developer for your next project?
Dash Drop App: https://apps.shopify.com/dash-drop-delivery
Email: rajat.shopify@gmail.com
Portfolio: https://rajatweb.dev

ProductifyGroups App:  Shopify App - Product Variants