Forum Discussion

Annette1101's avatar
Annette1101
Brass Contributor
Aug 31, 2022

Remove banner/SharePoint ribbon for an anonymous site

I have a site that is permissioned to anonymous as it contains details about becoming a provider with our agency. No trade secrets, just a site with detailed information on what the visitor has to do next to become a provider. 

Is there a way to remove the SharePoint banner/ribbon from this site?

  • Annette1101 There is no SharePoint out of the box option to hide office 365 ribbon at the top.

     

    Workaround (Not recommended):

    You can inject custom CSS on SharePoint online modern pages using SPFx application customizer & hide the office 365 ribbon.

    Check below references for more information:

    1. How can I include the same JS and CSS files on multiple SharePoint Modern Page?
    2. Customize SuiteBar on modern SharePoint online site
    3. Trimming the Suite Bar + Ribbon on Modern SharePoint Sites in Office 365

    Note: DOM manipulation & CSS customizations are not recommended by Microsoft and some of your customization may break if Microsoft changes HTML element id/classes in new release updates.


    Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.

    • Annette1101's avatar
      Annette1101
      Brass Contributor

      ganeshsanap How do others handle the branded banner when creating anonymous sites? Our banner currently says "The Bridge" which is our employee intranet. As you can see it has an image of a bridge which is hyperlinked to the URL of our employee intranet. It looks like if we create a new SharePoint site and permission it anonymously, they will continue to see this banner. Am I missing something?

      • ganeshsanap's avatar
        ganeshsanap
        MVP

        Annette1101 yes, this is a Office 365 ribbon/bar and it will be visible on all SharePoint sites by default.

         

        If you want to hide it from specific SharePoint site, you have to create a SPFx application customizer which will hide it using custom CSS. Then deploy this SPFx solution for your specific SharePoint site.


        Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.

Resources