Sitelink Search Box mark-up when multiple query strings are used
-
Hi all,
I'm looking to implement sitelink search box mark-up in Google Tag Manager in JSON-LD format. This would be popped into the Custom HTML tag and would look a little something like:
The above option is great if you have one query string for your search term, but what if you had a URL that triggered two query strings - for example:
https://www.example.com/search?q=searchterm&category=all
Would you need to amend the code something like the below:
Any help would be much appreciated!
Cheers,
Sean
-
Hi Sean,
While multiple variables are technically allowed—Schema.org only requires that your URI templates follow RFC6570, and that does allow multiple variables—there's no indication that Google will recognise it.
In fact, if you look at schema.org/SearchAction, you'll see there's no such property as "query-input". The property they've agreed on is the more flexible "query". Google isn't using that, and it seems that, for now, they'll only expand and use one variable in your target URL.
They might change it in the future. For now, as a bit of a rubbish workaround, you could hardcode the value of category to be "all", like this:
"target": "https://www.example.com/search?q={search_term_string}&category=all"
This way, sitelink search results will always at least come through to your site and by default search through all categories. But by then, at least users are on your site, and you could then use faceted navigation to help them drill down into particular categories.
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
Google Image Search - Is there a way to influence the related icons at the top of the image search results?
Google recently added related icons at the top of the image search results page. Some of the icons may be unrelated to the search. Are there any best practices to influence what is positioned in the related image icons section? Thank you.
Intermediate & Advanced SEO | | JaredBroussard1 -
Use of "/" and using fractions in titles
We are a company that sells pipe and fittings. An example of a part that someone will search for is : 3/4" PVC Socket I am not sure how best to represent the fraction in the title of the page that has such a product. I am concerned that if I use the forward slash it will be misinterpreted by search engines (although it will be interpreted properly by users). A lot of folk search for the product by the fraction size and so it would be good to be able to represent it in the title, but I don't want to get "punished" by confusing search engines. I could replace the forward slash with a hyphen or pipe symbol, but then may look a bit weird to our users... Any recommendations? Bob
Intermediate & Advanced SEO | | BobBawden11 -
How to optimize an ecommerce catalog that uses parameters only
Hello ! I am facing a problem concerning a client's website that has been developped using filters that create parameters - there are no categories. This means that, no matter what I choose as a filter, the page title, desc and my H1 stays the same. In a beautiful, unicorn rainbow filled world - I could just tell them to restructure their site with new categories/sub categories AND with filters. For SEO purposes and to find a temporary solution until we can change the architecture, what would be the best choice? Should we create individual pages that serves the same content as the catalog, but with rewritten URL, Title, Description and canonical?
Intermediate & Advanced SEO | | Charles-O
ie: http:/domain.com/catalog/?brand=moz canonical to http:/domain.com/catalog/brand/moz ? I noticed indeed.com does that (https://ca.indeed.com/SEO-Specialist-jobs vs https://ca.indeed.com/jobs?q=SEO+Specialist&l=) Should we dynamise the content depending on which filters has been selected? Of course, some filters are real filters that wouldn't attract or add any value (such as order by) Thanks for your input!0 -
Using a pre-design template and SEO
Hi, If I use a template that maybe 50 other websites use but customise it my way will I still rank or will it hurt my ranking because other websites have the same template (even though they are in a different industry). Thanks,
Intermediate & Advanced SEO | | seoanalytics0 -
Re-using content
Hi, I've just sold the domain for a website, so I'm free to re-purpose the content over to another website I own. How can I make sure that Gg doesn't deem it as duplicate? Do I need to let Gg naturally realise that the 'original' website no longer has the content on it? Do I need to hold-off putting the content live again? Should I notify Gg by-way of a de-index request, etc (assuming the domain won't incur any difficulty if I do this)? Thanks in advance.
Intermediate & Advanced SEO | | newstd1000 -
Best way to deal with multiple languages
Hey guys, I've been trying to read up on this and have found that answers vary greatly, so I figured I'd seek your expertise. When dealing with the url structure of a site that is translated into multiple languages, is it better SEO wise to structure a site like this : domain.com/en domain.com/it etc or to simply add url modifiers like domain.com/?lang=en domain.com/?lang=it In the first example, I'm afraid google might see my content as duplicate even though its in a different language.
Intermediate & Advanced SEO | | CrakJason0 -
The Site: search and Flow of PageRank
It is my understanding that if I do a search for site:mydomain.com the results are like every other SERP in that the most authoritative pages are ranked higher. So obviously I would expect my homepage to be first (in most cases), then followed by main category pages, etc. My question is has anybody ever seen disturbing results when doing this (i.e. pages that should have no authority outranking main category pages)? Is this always an issue with site structure or can you think of other factors that may cause this?
Intermediate & Advanced SEO | | purch0 -
Organic Search Problems?
Hey guys, I am in need of a little help! I am currently an aspiring SEO (trying to absorb as much information as I can and implement changes to help my site organically)... Most of my experience revolves around SEM. That being said, I have a problem. My site is doing well through paid search... great quality scores, etc. However, the content on my site (and even my site as a whole) does not "appear" to rank well in Organic. To explain further... My site is federalautoloan.com... and when I type in exact article names (or even federal auto loan) into Google, nothing shows up. And yes, my content is all original/unique content. I've even recently added a unique Calculator to my site. site:federalautoloan.com in the search bar shows results for all of my pages... but it just seems as though Google does not like my site for some reason. At least in Organic. The odd thing is, none of my other sites have this problem. Do you guys have any advice? The only thing I can think of is that somehow my 301 redirect was performed improperly. Yes, I had a permanent redirect performed on my site about 4 months back. The URL we were using prior just wasn't performing as well in Paid Search. But seeing as how that is the preferred method by Google... I'm really at a loss... Again, my site is FederalAutoLoan.com. Any help would be GREATLY appreciated. Even generic SEO advice would be appreciated. Edit: Two other things to note... I have plugged my site into the SEOmoz Pro tool... the tool is not showing any issues for my site. I am also making use of Google Webmaster Tools and the only error that shows up for my site is a Soft 404 for one of my pmcs... Not sure why it is even pulling one of my pmcs... but as far as I can tell, there really shouldn't be any problems. Note on the 404 for anyone who might give a response on that issue... http://www.seoconsultants.com/tools/headers returns a 200 OK response. Edit2: Question presented below.
Intermediate & Advanced SEO | | WPColt0