Here are steps to add duckduckgo site search engine search to your website.
- Go to https://duckduckgo.com/search_box
- Give a width to your search box ( An ideal width is around 250 px ) the default is 480 px.
- Turn off the duckduck go logo.
- Give a background color. (Here is a complete list of color codes http://html-color-codes.com/)
- Under site search, enter the website you want to search. (example: expertrec.com)
- Under prefill, enter the placeholder value ( default text inside the search box).
- Autofocus -turn on or off (on – means when someone visits your site, the cursor is by default in the search box).
- Now copy paste the code to your website by placing it inside a div on pages where you want the search to appear.
- The code might look something similar to this-
XHTML1<iframe src="https://duckduckgo.com/search.html?width=250&site=expertrec.com&prefill=Search expertrec.com&focus=yes" style="overflow:hidden;margin:0;padding:0;width:308px;height:40px;" frameborder="0"></iframe>
- That’s it – you have successfully added duckduckgo custom search to your site.
Some drawbacks of this duckduckgo custom search engine is that it contains ads and the search results are taken to duckduckgo’s website which could lead to high bounce rate and affect your seo rankings.
To get a ad free search experience, sign up for expertrec’s custom search engine- https://cse.expertrec.com/?platform=cse