How to add Google Search to your website, Blog

How to create a search box connected to Google search engine, for websites, Blogs on HTM.WIKI
Explain why to choose Google search engine for your website, with some other search solutions: at the end of this article.
Creating a search box with Google, here may be the simplest way. Just a few steps.
  1. First, you define where to show the search box, there you need to paste the code ((googlesearchbox)).
    For example, you need to attach to the home page, you will open the homepage content editor, write this code in the content.
  2. If your site does not have a Google-Search-ID code, this search-box will be hidden.
  3. Here's a guide on how you can generate the Google-Search-ID code and add it to your site configuration.


  1. Your site is already connected to Google Search Console! (if not, see how to do it)
  2. Start to register the Google-Search-ID code by visiting the link, fill in the information as shown in picture 2 above.
  3. Once registration is successful, you need to copy the CX code, as shown in picture 3
  4. Declare this CX number (Google-Search-ID code) to your website: Open "configuration" on admin, enter in the box "Google Custom Search - CX". Save and complete the connection with Google.
  5. Place the search box on any page, you can open any content page, or the layout to insert the code ((googlesearchbox)). The search box will be replaced at this location.
  6. Layout view of the search box, you can customize it at: Layout Unit> search-google-form



From the perspective of an expert, I temporarily distinguish there are 3 search solutions applicable to any website. If your site has a clear layout, or has too few articles, do not use the search box (because it makes your site more confusing, while visitors easily find a content).
Method 1: is widely used by default, which is a way to search for a match of a character string. The software will search for each article, compare the content of the article containing the entered keyword or not, if found, it will produce the results. In case the user types a typo, no search results will appear. I recommend DON'T use this method: because the customers they type in emotionally, they are not the admin, or the content writer, so they don't know exactly what words to enter to get the results!
Method 2: Use a dedicated search engine, run in the Java language. The way it works is almost identical to the third method. Fees 250USD/year
Method 3: Use Google search engine.
Websites, Blogs using W3AMP by default are used by Google. Let's consider Google as a trusted partner, moreover it's built-in, completely free.


Method 2 is expensive, but the search results are very effective. If the customer enters any keyword, there may be misspellings, or the words are messy, can add periods, commas, etc., the results will be almost correct. This can also be considered a type of artificial intelligence application. The benefit is: when you post a new article on the website, or when editing content, the data on the search engines is also updated immediately. If your website is a big brand, or has a lot of articles (over 5000 articles), you may need to use this method.
Method 3: Using Google, the search is extremely accurate, the accuracy is higher than method 2, because the intelligence of the Google machine can clearly imagine that it is much better. It intelligently understands multilingual issues, synonyms, semantics, etc.. But in return, new articles created on your website have to wait for search engines to crawl. If you want to go faster, you can manually submit the new link for the fastest Google crawl. Also, when you edit content on your website, you have to wait for the Google machine to come back to get the new data, update the data on their servers, and that waiting time is not committed to exactly how long.< br>
W3AMP has tried to simplify the steps so that admins can manually mount the Google search engine, meticulously designed the interface page to display the most user-friendly results. And more importantly, when admins can use this search engine to see how the links on their website show up on search engines. Looking after links on search engines is extremely important for e-marketing.

In short, when your site has few articles, there is no need to add a search box. When needed, you should use the built-in Google search engine as the steps above. If you need technical support, please don't hesitate to email us at