I need to add google search bar on the SharePoint website, I used the embed code but its not working

Sukhbaj Singh 0 Reputation points
2024-07-11T06:26:04.2733333+00:00

Hi,

Hi,

I have embedded an iframe code on the SharePoint site to include a Google search bar using the CSE (Custom Search Engine) code, but it is not working. Please check the code below and assist me with this issue:

<iframe src="https://cse.google.com/cse?cx=YOUR_SEARCH_ENGINE_ID" style="width: 100%; height: 500px; border: none;">

</iframe>

Microsoft 365 and Office Install, redeem, activate For business Windows
Microsoft 365 and Office SharePoint For business Windows
{count} votes

1 answer

Sort by: Most helpful
  1. Ling Zhou_MSFT 23,620 Reputation points Microsoft External Staff
    2024-07-11T08:43:57.05+00:00

    Hi @Sukhbaj Singh,

    Thank you for posting in this community.

    Are you experiencing this error?

    User's image

    I checked the relevant information and came to the following conclusions:

    It is not possible to embed a Google search bar using a frame code on a SharePoint site. This is because Google does not allow embedding of their search engine in this way.

    Hope this information is useful to you.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.