logo
search
SharePoint Document Issues

Fix SharePoint Button Opens a Link Instead of Scrolling to Section

WPS Content ManagerWPS Content Manager Sep 28, 2026 869 views

Question details

The user needs to configure a SharePoint button to scroll to a specific heading or section on the same page rather than opening a new tab or redirecting.

How to Fix SharePoint Button Opening a Link Instead of Scrolling to a Section
Product
SharePoint
Device & OS
not provided
Scenario
Linking a button web part to a page section using a heading permalink.
Observed behavior
The button opens a new tab and redirects to a full external URL, often containing the mcas.ms domain, instead of scrolling to the target section.
Before you start

Ensure you have edit permissions for the SharePoint page and verify that the section you want to link to is formatted using a standard SharePoint Heading style.

Solution 1Recommended

Verify Heading Styles and Recreate the Relative Permalink

Ensure the target text acts as an anchor by using a heading style, and update the button with the correct relative permalink.

SharePoint automatically generates a permalink for any text formatted as a heading. If a button points to a full absolute URL instead of a relative permalink, it may force the page to reload or open a new tab.

1
Edit the SharePoint page

Navigate to your SharePoint page and click the 'Edit' button located at the top right corner of the screen.

2
Apply a heading style

Highlight the text at your target destination and use the text formatting toolbar to apply a Heading 1, Heading 2, or Heading 3 style.

3
Copy the permalink

Hover your cursor over the newly formatted heading until a link icon appears. Right-click the icon and select 'Copy link address'.

4
Update the button link

Select your button web part and click the pencil icon to open its properties. Paste the copied link into the link field, ensuring it acts as a relative link (e.g., starting with a # symbol for the heading).

5
Publish and test

Republish the page and click the button to verify it smoothly scrolls to the section without opening a new tab.

Verify Heading Styles and Recreate the Relative Permalink
Free Microsoft Office alternative

Looking for a Seamless Document Collaboration Tool?

While SharePoint handles intranet pages, managing and co-authoring the actual documents can sometimes be complex. WPS Office provides a free, lightweight, and highly compatible alternative to Microsoft Office. Enjoy a familiar interface and seamless document sharing without the hassle of complicated link configurations.

Fully compatible with Microsoft Office formats (.docx, .xlsx, .pptx).Lightweight design for fast startup and smooth document editing.Familiar user interface with zero learning curve.Built-in cloud capabilities for easy document sharing and team collaboration.
QA img-9

Frequently Asked Questions

Why does my SharePoint link change to an mcas.ms URL?

The mcas.ms domain is used by Microsoft Defender for Cloud Apps. It intercepts and rewrites URLs for security monitoring, which can inadvertently break relative anchor links on SharePoint pages, causing them to act as external redirects.

How do I create a permalink for a section in SharePoint?

Highlight the text you want to link to, apply a Heading style (Heading 1, 2, or 3) from the text web part toolbar, hover over the text to reveal the link icon, and copy the link address.

Can I stop a SharePoint button from opening a new tab?

Yes. Edit the button web part properties and look for the 'Open in a new tab' toggle. Turn this off so the link opens in the current window. Note that absolute external links may sometimes still default to a new tab depending on site settings.

Why is my heading permalink not working after publishing the page?

This often happens if the page is heavily cached by your browser or if the link was pasted as an absolute URL instead of a relative URL. Try pasting only the anchor part (e.g., #your-heading) and test the page in an incognito or private browsing window.