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
-
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 -
Duplicate Content Pages - A Few Queries..
I am working through the latest Moz Crawl Report and focusing on the 'high priority' issues of Duplicate Page Content. There are some strange instances being flagged and so wondered whether anyone has any knowledge as to why this may be happening... Here is an example; This page; http://www.bolsovercruiseclub.com/destinations/cruise-breaks-&-british-isles/bruges/ ...is apparently duplicated with these pages; http://www.bolsovercruiseclub.com/guides/excursions http://www.bolsovercruiseclub.com/guides/cruises-from-the-uk http://www.bolsovercruiseclub.com/cruise-deals/norwegian-star-europe-cruise-deals Not sure why...? Also, pages that are on our 'Cruise Reviews' section such as this page; http://www.bolsovercruiseclub.com/cruise-reviews/p&o-cruises/adonia/cruising/931 ...are being flagged as duplicated content with a page like this; http://www.bolsovercruiseclub.com/destinations/cruise-breaks-&-british-isles/bilbao/ Is this a 'thin content' issue i.e. 2 pages have 'thin content' and are therefore duplicated? If so, the 'destinations' page can (and will be) rewritten with more content (and images) but the 'cruise reviews' are written by customers and so we are unable to do anything there... Hope that all makes sense?! Andy
Intermediate & Advanced SEO | | TomKing0 -
Canonical URL on search result pages
Hi there, Our company sells educational videos to Nurses via subscription. I've been looking at their video search results page:
Intermediate & Advanced SEO | | 9868john
http://www.nursesfornurses.com.au/cpd When you click on a category, the URL appears like this:
http://www.nursesfornurses.com.au/cpd?view=category&cat=9&name=Acute+Surgical+Nursing
http://www.nursesfornurses.com.au/cpd?view=category&cat=6&name=Medications Would this be an instance where i'd use the canonical tag to redirect each search results page? Bearing in mind the /cpd page is under /Nursing cpd, and that /Nursing cpd is our best performing page in search engines, would it be better to refer it to the 'Nursing CPD' rather than 'CPD' page? Any advice is very welcome,
Thanks,
John0 -
My website (non-adult) is not appearing in Google search results when i have safe search settings on. How can i fix this?
Hi, I have this issue where my website does not appear in Google search results when i have the safe search settings on. If i turn the safe search settings off, my site appears no problem. I'm guessing Google is categorizing my website as adult, which it definitely is not. Has anyone had this issue before? Or does anyone know how to resolve this issue? Any help would be much appreciated. Thanks
Intermediate & Advanced SEO | | CupidTeam0 -
Can I use rel=canonical and then remove it?
Hi all! I run a ticketing site and I am considering using rel=canonical temporary. In Europe, when someone is looking for tickets for a soccer game, they look for them differently if the game is played in one city or in another city. I.e.: "liverpool arsenal tickets" - game played in the 1st leg in 2012 "arsenal liverpool tickets - game played in the 2nd leg in 2013 We have two different events, with two different unique texts but sometimes Google chooses the one in 2013 one before the closest one, especially for queries without dates or years. I don't want to remove the second game from our site - exceptionally some people can broswer our website and buy tickets with months in advance. So I am considering place a rel=canonical in the game played in 2013 poiting to the game played in a few weeks. After that, I would remove it. Would that make any sense? Thanks!
Intermediate & Advanced SEO | | jorgediaz0 -
One Business-Multiple Services
Hello Everyone, I was looking for some strategies for doing SEO on a site that offers multiple services. Here is the example: There is one company with ONE physical address. They perform the following services: Pest Control Mold Remediation Home Inspections Waterproofing They also handle these services in several surronding cities. They want to maintain one website for branding purposes. Obviously I will create individual pages on their site for each service but was wondering how diffiuclut it will be to rank one website for these various services. Thank you!
Intermediate & Advanced SEO | | wparlaman0 -
What would be the SEO benefits of using Lulu ? (ebook)
Hi there, how are you guys doing? We wrote an ebook to promote our new website and I was investigating the idea of putting it on Lulu. Did anyone ever use Lulu? If so, do you have any feedback please? I got a free ISBN number on Lulu and it looks like I may be able to distribute it on Amazaon. Also, I'm giving out the ebook for free. Thanks guys! I hope you're having a great day
Intermediate & Advanced SEO | | Ericc220 -
Search listing click through to wrong domain?
Hi there, I've got an interesting case that I've not seen before and can't find anything about online. Some of our SERP listings are not getting through to the correct website. Instead they go to a domain called "watchingsquare.com" (doesn't resolve), which is not affiliated with our business or the website the listings are actually for. This only seems to happen 50% of the time. For example, if I click on the listings once I'm taken to watchingsquare.com, go back and attempt again and I am sent to the correct website. Has anyone encountered similar issues and know how to resolve?
Intermediate & Advanced SEO | | pethealthinc0