The Moz Q&A Forum

    • Forum
    • Questions
    • My Q&A
    • Users
    • Ask the Community

    Welcome to the Q&A Forum

    Browse the forum for helpful insights and fresh discussions about all things SEO.

    1. SEO and Digital Marketing Q&A Forum
    2. Categories
    3. Intermediate & Advanced SEO
    4. Sitelink Search Box mark-up when multiple query strings are used

    Sitelink Search Box mark-up when multiple query strings are used

    Intermediate & Advanced SEO
    2 2 120
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as question
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • seanginnaw
      seanginnaw last edited by

      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

      1 Reply Last reply Reply Quote 0
      • StephanSolomonidis
        StephanSolomonidis last edited by

        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.

        1 Reply Last reply Reply Quote 0
        • 1 / 1
        • First post
          Last post
        • Search queries results Wrong
          OlegKorneitchouk
          OlegKorneitchouk
          0
          4
          74

        • Google Search Console Tools Sitelinks
          Kdruckenbrod
          Kdruckenbrod
          0
          4
          237

        • Do Query Strings strip SEO value?
          Martijn_Scheijbeler
          Martijn_Scheijbeler
          0
          3
          668

        • Whch Google Advanced Search Query To Use?
          MattAntonino
          MattAntonino
          0
          4
          186

        • An improved search box within the search results - Results?
          DennisSeymour
          DennisSeymour
          0
          2
          91

        • Search box within search results question
          Lumina
          Lumina
          0
          2
          57

        • BizaarVoice Cloud SEO: Canonical Query String
          Everett
          Everett
          0
          2
          179

        • Which search engines still use Meta Keywords?
          jhinchcliffe
          jhinchcliffe
          0
          6
          3.2k

        Get started with Moz Pro!

        Unlock the power of advanced SEO tools and data-driven insights.

        Start my free trial
        Products
        • Moz Pro
        • Moz Local
        • Moz API
        • Moz Data
        • STAT
        • Product Updates
        Moz Solutions
        • SMB Solutions
        • Agency Solutions
        • Enterprise Solutions
        • Digital Marketers
        Free SEO Tools
        • Domain Authority Checker
        • Link Explorer
        • Keyword Explorer
        • Competitive Research
        • Brand Authority Checker
        • Local Citation Checker
        • MozBar Extension
        • MozCast
        Resources
        • Blog
        • SEO Learning Center
        • Help Hub
        • Beginner's Guide to SEO
        • How-to Guides
        • Moz Academy
        • API Docs
        About Moz
        • About
        • Team
        • Careers
        • Contact
        Why Moz
        • Case Studies
        • Testimonials
        Get Involved
        • Become an Affiliate
        • MozCon
        • Webinars
        • Practical Marketer Series
        • MozPod
        Connect with us

        Contact the Help team

        Join our newsletter
        Moz logo
        © 2021 - 2026 SEOMoz, Inc., a Ziff Davis company. All rights reserved. Moz is a registered trademark of SEOMoz, Inc.
        • Accessibility
        • Terms of Use
        • Privacy