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
-
Using same copy on different domain
I have a client that currently has a .com domain (not using hreflang) . They have a new partner in the UK and they want to replicate the website and use a .co.uk domain. It will be a different brand name. Will this cause any SEO issues?
Intermediate & Advanced SEO | | bedynamic0 -
Informational query
Hello, In an informational query can the answer people are looking for have multiple intent or will it always have 1 intent ? For example New York, the intent is probably where ? On a longer query such as "Provence bike tour" what is the intent ? Where, what, Why, How to, when ? Thank you,
Intermediate & Advanced SEO | | seoanalytics0 -
Bolded words in search results
are those synonyms or semantically related keywords ? Thank you,
Intermediate & Advanced SEO | | seoanalytics0 -
Multiple H2 tags
Is it advisable to use only one H2 tag? The template designs for some reason is ended up with multiple H2 tags, I realise if any think it's that each one is that are important and it is all relative. Just trying to assess if it's worth the time and effort to rehash the template. Has anyone done any testing or got any experience? Thanks
Intermediate & Advanced SEO | | seoman101 -
Puzzling drop in search referrals.
Hello All, A few weeks ago I posted in the Q and A believing I had received a google penalty due to a sudden and considerable drop in referrals... http://www.seomoz.org/q/google-penalty-8 ... so I dug right to the bottom of my site and did a complete review of all my links. After clearing all the potentially problematic links, I wrote a very descriptive reconsideration request to google. 10 days or so later I received a 'no manual spam action found' response, which I guess is a good thing but now begs the question- what has gone wrong!? Over the past 4 or 5 months I've been doing some heavy work on the SEO of my site, www.madegood.org. This has all been white hat stuff (as far as I'm aware), and have been using my seomoz pro account to monitor progress. I've done lots of reading on the subject so think I'm up to scratch on most general good advice, in terms of link building and site structure. I've always tried to create very high quality content and have been building some great links from very authoritative sites including The Guardian newspaper and Sheffield University. My pro dashboard is telling me that my link analysis history is improving, despite my keyword performance declining. Is there anyone that can do a deep review of my site? I'm happy to share my analytics/webmaster tools etc info with you if that is helpful? I'm totally lost here and am becoming disheartened with all the hard work I've been putting into the SEO for my site. Thanks so much in advance, any help is gratefully received. Of course I can provide more info should you need it. Will
Intermediate & Advanced SEO | | madegood0 -
Sitelinks (breadcrumbs) in SERPs
Hi there, I have a .co.uk & .ie website both have the exact same content, only differences is the UK website is selling the product in pounds and the Irish website is selling in Euros plus both websites have different contact numbers. I decided to use rel canonical on the .ie pointing to the .co.uk website as I think it was having an issue in my SERPs for the .co.uk website in Google.co.uk, anyway since doing this, I am seeing strange things happening in SERPs for my keywords, for example if you click the link below, my website is number 2 for 'hot flushes' if you hover over or click on 'health or 'menopause' in the breadcrumbs in SERPs it takes you to the .co.uk website, is this normal? Click here
Intermediate & Advanced SEO | | Paul780 -
What is the best approach to a keyword that has multiple abbreviations?
I have a site for which the primary keyword has multiple abbreviations. The site is for the computer game "Football Manager", each iteration is often referred to as FM2012, FM12 or Football Manager 2012, the first two can also be used with or without spaces inbetween. While this is only 3 keywords to target, it means that every key phrase such as "FM2012 Tactics", must also be targeted in 3 ways. Is there a recommended approach to make sure that all 3 are targeted? At present I use the full title "Football Manager" in the the title and try to use the shorter abbreviations in the page, I also make sure the title tags always have an alternative e.g FM2012 Tactics Two specific questions as well as general tips: Does the <abbr>HTML tag help very much?</abbr> Are results likely to differ much for searches for "FM 2012" and "FM2012" i.e. without the space.
Intermediate & Advanced SEO | | freezedriedmedia1 -
Should I check Use noindex for Tag Archives?
I have a page indexed > (http://mysite.com/mypost) and also http://mysite.com/tag/mypost The same post shows up twice, one with /tag/ one without when I search site:http://mysite.com
Intermediate & Advanced SEO | | vinner-280241
Is this a duplicate content?? Can I get penalized for this? In the All in one plugin should I check Use noindex for Tag Archives to avoid this or doesn't matter.
Thanks0