Hide/Disable the URL-path after section scroll

Hello dear Webflow users;),

I‘ve got the „Problem“, that if I want to use the section-scroll function in Webflow, so that if I click a button, the page scrolls automatically to the section-ID I selected. And the main problem I have with that, is, that I can also find the section-ID in the URL-path after the sub-domain. And I think, that this is pretty annoying, because if I reload the page, the URL doesn‘t reset to the sub-domain.

To come to an end, I just wanted to ask here, if someone knows a solution for this „problem“, or if I can hide or disable this path.

————————————————————————
I am pretty shure, that the change of the URL was also the intention of the webflow team, but to be honest. I don‘t like that side effect.

I‘d be happy for every reply on this threat:,)

1 Like

I’m facing a related problem. We use the path to track the origin of our leads and losing that information when the user clicks on the CTA is an annoying problem.

This isn’t directly Webflow-related, it’s the standard way that browsers represent in-page navigation.

Yes, you can accomplish this with custom code. Look into;

  • browser history, which lets you override the URL displayed, and what’s kept in the history stack ( for e.g. back button clicks ).
  • scrollTo, which tells the browser to scroll

On page load, you’d check for a #hash, find its position, scroll to it, and change the browser history to remove it.

The basic approach is above, but for tracking purposes you’ll need to consider at what point your data capture is happening and how to represent it the way you want.

If you have a CTA which is then capturing the current page path as part of a hidden form field(?) then you can use the above approach and just make certain that your hidden field is updated as well as the browser history.

Hey everyone!

I just made this script & tutorial to remove the anchor path/section path from the URL string once it’s been navigated to.

Hope this helps!!

2 Likes