# SEO - how to get a search bar at google?

**URL:** https://meta.discourse.org/t/seo-how-to-get-a-search-bar-at-google/80394
**Category:** Support
**Created:** [2월 12, 2018, 6:07오후 UTC](https://meta.discourse.org/t/seo-how-to-get-a-search-bar-at-google/80394 "2018-02-12T18:07:17Z")
**Posts on this page:** 18
**Page:** 1

<div class="post-metadata">

### Author: ![frold](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/frold/32/82547_2.png) [@frold](https://meta.discourse.org/u/frold)
#### Post date: [2월 12, 2018, 6:07오후 UTC](https://meta.discourse.org/t/seo-how-to-get-a-search-bar-at-google/80394/1 "2018-02-12T18:07:17Z")

</div>

Hey,

This is the content you see at google when you search at my site (I know you might not understand the text):

 ![48](https://global.discourse-cdn.com/meta/original/3X/5/1/517f3528bd9da9de6fb4c8e4b85317c305f66e60.png)

This is how it look if you e.g search at “Lægeforeningen”.

 ![43](https://global.discourse-cdn.com/meta/original/3X/b/c/bc9c811ffefe46a0a17657d1579c1d816282e70b.png)

How to change the layout at google to e.g include a search bar for my site and nice layout then the “random” text at the moment?

I dont know anything about SEO 😃 Are there anything I can do ?

---

<div class="post-metadata">

### Author: ![vinothkannans](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/vinothkannans/32/86465_2.png) [@vinothkannans](https://meta.discourse.org/u/vinothkannans)
#### Post date: [2월 12, 2018, 6:31오후 UTC](https://meta.discourse.org/t/seo-how-to-get-a-search-bar-at-google/80394/2 "2018-02-12T18:31:09Z")

</div>

For search box you may need to add some code inside `<head>` tag as suggested here [Latest Google Search Documentation Updates | Google Search Central &nbsp;|&nbsp; What's new &nbsp;|&nbsp; Google for Developers](https://developers.google.com/search/docs/data-types/sitelinks-searchbox). And I think site links need to be configured via Google Webmaster tools.

---

<div class="post-metadata">

### Author: ![j.jaffeux](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/j.jaffeux/32/60297_2.png) [@j.jaffeux](https://meta.discourse.org/u/j.jaffeux)
#### Post date: [2월 12, 2018, 6:34오후 UTC](https://meta.discourse.org/t/seo-how-to-get-a-search-bar-at-google/80394/3 "2018-02-12T18:34:09Z")

</div>

The URL of a search in discourse has the following format:

`https://your.domain.tld/search?q=test`

So I think if you added this to the body of a theme component (the only thing you have to change is your.domain.tld):

```plaintext
<script type="application/ld+json">
{
   "@context": "http://schema.org",
   "@type": "WebSite",
   "url": "https://your.domain.tld/",
   "potentialAction": {
     "@type": "SearchAction",
     "target": "https://your.domain.tld/search?q={search_term_string}",
     "query-input": "required name=search_term_string"
   }
}
</script>

```

It could eventually work, bear in mind, that in the end only google is deciding if this will show or not, so you could add this code and it would do nothing.

---

<div class="post-metadata">

### Author: ![j.jaffeux](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/j.jaffeux/32/60297_2.png) [@j.jaffeux](https://meta.discourse.org/u/j.jaffeux)
#### Post date: [2월 12, 2018, 6:38오후 UTC](https://meta.discourse.org/t/seo-how-to-get-a-search-bar-at-google/80394/4 "2018-02-12T18:38:06Z")

</div>

@sam we might want consider doing this by default what do you think ?

---

<div class="post-metadata">

### Author: ![j.jaffeux](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/j.jaffeux/32/60297_2.png) [@j.jaffeux](https://meta.discourse.org/u/j.jaffeux)
#### Post date: [2월 12, 2018, 6:38오후 UTC](https://meta.discourse.org/t/seo-how-to-get-a-search-bar-at-google/80394/5 "2018-02-12T18:38:42Z")

</div>

I think it’s in body, do you see somewhere it’s saying `<head>` ?

---

<div class="post-metadata">

### Author: ![8BIT](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/8bit/32/76872_2.png) [@8BIT](https://meta.discourse.org/u/8BIT)
#### Post date: [2월 12, 2018, 6:42오후 UTC](https://meta.discourse.org/t/seo-how-to-get-a-search-bar-at-google/80394/6 "2018-02-12T18:42:47Z")

</div>

this would be pretty badass if it was on by default…

---

<div class="post-metadata">

### Author: ![vinothkannans](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/vinothkannans/32/86465_2.png) [@vinothkannans](https://meta.discourse.org/u/vinothkannans)
#### Post date: [2월 12, 2018, 6:46오후 UTC](https://meta.discourse.org/t/seo-how-to-get-a-search-bar-at-google/80394/7 "2018-02-12T18:46:07Z")

</div>

Yes it can be placed in body. Pinterest also placed it in body only.

---

<div class="post-metadata">

### Author: ![featheredtoast](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/featheredtoast/32/116994_2.png) [@featheredtoast](https://meta.discourse.org/u/featheredtoast)
#### Post date: [2월 12, 2018, 6:48오후 UTC](https://meta.discourse.org/t/seo-how-to-get-a-search-bar-at-google/80394/8 "2018-02-12T18:48:09Z")

</div>

It definitely sounds like a pretty cool feature for public sites, but I’d just like to caution that it would look weird on private ones. My preference would be to have it off by default, or have the ability to turn it off for private sites.

---

<div class="post-metadata">

### Author: ![frold](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/frold/32/82547_2.png) [@frold](https://meta.discourse.org/u/frold)
#### Post date: [2월 12, 2018, 7:11오후 UTC](https://meta.discourse.org/t/seo-how-to-get-a-search-bar-at-google/80394/9 "2018-02-12T19:11:41Z")

</div>

Now I did try to to add that snippet.

We will see if google eat it and it will add a search bar

Any way thanks for the help!

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [2월 12, 2018, 8:05오후 UTC](https://meta.discourse.org/t/seo-how-to-get-a-search-bar-at-google/80394/10 "2018-02-12T20:05:44Z")

</div>

I kind of like it, @codinghorror what do you think?

---

<div class="post-metadata">

### Author: ![Mittineague](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mittineague/32/114259_2.png) [@Mittineague](https://meta.discourse.org/u/Mittineague)
#### Post date: [2월 12, 2018, 10:30오후 UTC](https://meta.discourse.org/t/seo-how-to-get-a-search-bar-at-google/80394/11 "2018-02-12T22:30:30Z")

</div>

AFAICT, the sitelinks generally display in the SERPs when the search terms are more “general”.

For example a search for “Discourse meta” shows sitelinks. But a search for “discourse seo search bar google” will not have them under the link to this topic, nor under the same Discourse meta link after it that had them for the more general search.

Kind of like “give me the table of contents” vs “give me this page”

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [2월 12, 2018, 10:47오후 UTC](https://meta.discourse.org/t/seo-how-to-get-a-search-bar-at-google/80394/12 "2018-02-12T22:47:56Z")

</div>

I dunno we already have this

`<link rel="search" type="application/opensearchdescription+xml" href="https://meta.discourse.org/opensearch.xml" title="Discourse Meta Search">`

Are people _really_ going to be searching for the name of the site? That seems like a rare edge condition to me, not something we want to add permanent markup for.

---

<div class="post-metadata">

### Author: ![fefrei](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fefrei/32/119538_2.png) [@fefrei](https://meta.discourse.org/u/fefrei)
#### Post date: [2월 13, 2018, 12:37오후 UTC](https://meta.discourse.org/t/seo-how-to-get-a-search-bar-at-google/80394/13 "2018-02-13T12:37:34Z")

</div>

> [@codinghorror](#):
>
> Are people really going to be searching for the name of the site? That seems like a rare edge condition to me, not something we want to add permanent markup for.

Yes, people do this all the time. They do it because they don’t know what a URL is or how to create a bookmark – it’s simply their way to open any website.

This is somewhat sad, but surprisingly true :sadpanda:

---

<div class="post-metadata">

### Author: ![hustler](https://avatars.discourse-cdn.com/v4/letter/h/a8b319/32.png) [@hustler](https://meta.discourse.org/u/hustler)
#### Post date: [6월 3, 2018, 9:49오후 UTC](https://meta.discourse.org/t/seo-how-to-get-a-search-bar-at-google/80394/15 "2018-06-03T21:49:42Z")

</div>

I think this is a really good addition and unique point of difference. It highlights the site in search results, it stands more a chance of being used than being absent considering seems like a trivial update to make.

---

<div class="post-metadata">

### Author: ![verilog15](https://avatars.discourse-cdn.com/v4/letter/v/9f8e36/32.png) [@verilog15](https://meta.discourse.org/u/verilog15)
#### Post date: [1월 31, 2020, 12:13오전 UTC](https://meta.discourse.org/t/seo-how-to-get-a-search-bar-at-google/80394/16 "2020-01-31T00:13:39Z")

</div>

이걸 시도해서 결과를 얻은 분이 계신가요? 🙂

---

<div class="post-metadata">

### Author: ![Justin\_Vega](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/justin_vega/32/159021_2.png) [@Justin\_Vega](https://meta.discourse.org/u/Justin_Vega)
#### Post date: [1월 31, 2020, 12:35오전 UTC](https://meta.discourse.org/t/seo-how-to-get-a-search-bar-at-google/80394/17 "2020-01-31T00:35:57Z")

</div>

Bing, Yahoo, DuckDuckGo에서도 이와 비슷한 것을 보고 싶습니다. 🙂

---

<div class="post-metadata">

### Author: ![Jon\_M](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jon_m/32/158144_2.png) [@Jon\_M](https://meta.discourse.org/u/Jon_M)
#### Post date: [2월 18, 2020, 5:32오후 UTC](https://meta.discourse.org/t/seo-how-to-get-a-search-bar-at-google/80394/18 "2020-02-18T17:32:56Z")

</div>

이 문제를 조사하던 중 Google의 Rich Results Test([https://search.google.com/test/rich-results](https://search.google.com/test/rich-results))를 알게 되었습니다. 몇 개의 Discourse URL을 이 테스트 도구에 넣어보니, 모두 [Joffrey의 위 답변](https://meta.discourse.org/t/seo-how-to-get-a-search-bar-at-google/80394/3?u=jon_m)에서 언급된 결과들이 표시되는 것 같았습니다.

 ![Screen Shot 2020-02-18 at 12.27.49 PM](https://global.discourse-cdn.com/meta/original/3X/3/d/3d4bf43e50aa3724647bb418884ee11a92b94b80.png)

경우에 따라 다를 수 있지만, 제 조사 결과를 공유해 봅니다.

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [1월 17, 2024, 10:06오후 UTC](https://meta.discourse.org/t/seo-how-to-get-a-search-bar-at-google/80394/19 "2024-01-17T22:06:45Z")

</div>


