KVNHNF
KVNHNF

Reputation: 77

Structured Data Testing Tool: "There is an error in your Sitelinks Search Box template: OFF_DOMAIN"

I am trying to implement Schema.org markup (WebSite type):

<script type="application/ld+json">
    {
        "@context": "http://schema.org",
        "@type": "WebSite",
        "url": "Page URL",
        "potentialAction": {
            "@type": "SearchAction",
            "target": "https://www.finelovedolls.com/fr/?s={search_term}&post_type=product",
            "query-input": "required name=search_term"
            }
    }
</script>    

It seems correct as the target is what my website returns as a variable URL when using the search box.

However, I get the following mistake on Google SDTT results:

URL Template: https://www.finelovedolls.com/fr/?s={search_term}&post_type=product (There is an error in your Sitelinks Search Box template: OFF_DOMAIN.)

Upvotes: 4

Views: 2705

Answers (1)

unor
unor

Reputation: 96587

Google’s Structured Data Testing Tool seems to check if the host from the target value is the same as the host from the url value.

So if you use "url": "https://www.finelovedolls.com/fr/" instead of "url": "Page URL", the testing tool shouldn’t report this error anymore.

Upvotes: 2

Related Questions