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
-
How get google reviews on search results?
Hi, We have good google reviews. (4,8) Can we get this rating stars also on our organic search results ? Best remco
Intermediate & Advanced SEO | | remcoz0 -
Multiple Markups on The Same Page - Best Solution?
Hi there! I have a website that is build in react javascript, and I'm trying to use markup on my pages. They are mostly articles about general topics with common questions (about the topic), and for most articles I would like to use two markups: article markup + FAQ Markup ( for the questions in the article) article markup + how-to markup Can I do this or will Google get confused? Since I have two @type at the same time, for example @type": "FAQPage" and "@type": "Article". How should I think? I'm using https://schema.dev/ right now. Thanks!
Intermediate & Advanced SEO | | Leowa0 -
Corporate website in multiple locations and with multiple services
Dear Team, We are a corporate setup in India, we have the following services under different brand names: 1. Security guard services - ORION 2. Facility management services - NOIRO 3. Investigation services - Ascertain Solutions We are located in different locations - India, Bahrain and Abu Dhabi What is the best way to structure our website properties for getting maximum SEO benefit, please inform from the following options: i. One website with one blog, we will have multiple pages dedicated to each service where page titles can be the brand names of the service and the location, the domain will be of the parent company only. So everything comes under orionsecure.com. There will be a security services page for India, for Abu Dhabi , for Bahrain. Similar for investigation and facility management. **ii. Multiple websites for different locations and different services, **so there will be orionsecure.com, orionsecure.ae and orionsecure.bh. Also, there will be a noiro.com, noiro.ae etc. Each website will have a blog for content publishing (although it is hard to imagine how we can develop content for different locations). **iii. One website each for each service, location shown differently through domain masking, **so we keep developing different pages as per the different locations on one website only, but this is shown differently through domain masking. Please help with this query, I really need an answer to this. If any more questions, please connect on naman.arora@orionsecure.co.in or call on +91-8510999664. Thanks and Regards, Naman Arora
Intermediate & Advanced SEO | | Ascertain_Solutions0 -
Do you lose link juice when stripping query strings with canonicals?
It is well known that when page A canonicals to page B, some link juice is lost (similar to a 301). So imagine I have the following pages: Page A: www.mysite.com/main-page which has the tag: <link rel="canonical" href="http: www.mysite.com="" main-page"=""></link rel="canonical" href="http:> Page B: www.mysite.com/main-page/sub-page which is a variation of Page A, so it has a tag I know that links to page B will lose some of their SEO value, as if I was 301ing from page B to page A. Question: What about this link: www.mysite.com/main-page?utm_medium=moz&utm_source=qa&utm_campaign=forum Will it also lose link juice since the query string is being stripped by the canonical tag? In terms of SEO, is this like a redirect?
Intermediate & Advanced SEO | | YairSpolter0 -
BizaarVoice Cloud SEO: Canonical Query String
We've implemented BazaarVoice with the latest Cloud SEO. As an eComm site, BV helps us manage our own reviews along with currating reviews from vendors on product pages that don't have any. Only a maximum of 7 reviews are displayed at one time and any additional are on a "next" page. BV has asked to include a query string (?bvrrp=...) on our canonical tags that would allow SEs to read the additional reviews. For example, the current canoncial URL will go from this http://www.sitename.com/item/product-name/123456789 to http://www.sitename.com/item/product-name/123456789**?bvrrp=Main_Site/reviews/product/2/123456789.htm** Having more crawlable UGC is advantagous but I'm skeptical about adding this. Just looking for any guidance. Thanks! WMCA
Intermediate & Advanced SEO | | WMCA0 -
Releasing Multiple Language Blog Articles ?
I was hoping anyone could give me some advice on my situation Our blog is a huge traffic source for us, we frequently release fresh blog articles on our English language website bringing lots of relevant traffic for a variety of different relevant topics Some of these articles would be very useful and relevant for visitors to our German website so i would like to get them translated and posted on our separate German language blog on our separate German website. The article text will not change much as the information is the same for Germany also How should i go about this without running into duplicate content issues with Google I looked into rel=alternate and realized that i cannot use this over two separate websites, i also thought about rel=canonical but it doesn't look like this would be suitable either Can anybody please give me any advice or thoughts on this ?
Intermediate & Advanced SEO | | Antony_Towle0 -
Transactional vs Informative Search
I have a page that id ranking quiet good (Page1) for the plural of a Keyword but it is just ranking on Page 3 for the Singular Keyword. For more then one Year I am working on Onpage and Offpage optimization to improve ranking for the singular term, without success. Google is treating the two terms almost the same, when you search for term one also term 2 is marked in bold and the results are very similar. The big difference between both terms is in my opinion that one is more for informational search the other one is more for transactional search. Now i would be curious to know which factors could Google use to understand weather a search and a website is more transactional or informative? Apart of mentioning: Buy now, Shop, Buy now, Shop, Special offer etc. Any Ideas?
Intermediate & Advanced SEO | | SimCaffe0 -
How do I link a profile picture to my search results?
How do you get an icon which links to a google profile to display in google search results? Link this.... https://skitch.com/edwardrobertshaw/f12f8/central.ly-google-search
Intermediate & Advanced SEO | | ed1234560