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
Microsoft 365
Formerly Office 365, is a line of subscription services offered by Microsoft which adds to and includes the Microsoft Office product line.
5,171 questions
SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
10,868 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Ling Zhou_MSFT 18,250 Reputation points Microsoft Vendor
    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.