Rule: structured-data-present
Structured data (JSON-LD) tells search engines exactly what your page contains in a machine-readable format. Without it, you miss rich results: FAQ dropdowns, breadcrumbs, star ratings, how-to steps. This rule checks for the bare minimum — at least one JSON-LD block exists on the page.
What it checks
Indxel scans the HTML for <script type="application/ld+json"> tags. The rule passes if at least one such tag exists with parseable JSON content. It does not validate the JSON-LD schema — that's handled by the companion rules structured-data-valid and structured-data-complete.
Thresholds
At least one <script type="application/ld+json"> tag with parseable JSON
No JSON-LD blocks found on the page
Edge cases
Microdata and RDFa are alternative structured data formats that Google also supports. Indxel only checks for JSON-LD, which is Google's recommended format and the one used by 95%+ of modern sites.
A JSON-LD block with invalid JSON (syntax error) counts as present but will fail structured-data-valid. This rule only checks that the <script> tag exists.
JSON-LD in the <body> (not just <head>) is valid. Google reads JSON-LD from anywhere in the HTML. Indxel scans the full document.
Minified JSON-LD is fine. Indxel parses the JSON regardless of formatting.
Configuration
// indxel.config.ts
import { defineSEO } from "indxel";
export default defineSEO({
rules: {
"structured-data-present": true, // enabled by default
},
});
// Add a BreadcrumbList to every page via layout:
// This ensures structured-data-present always passes.
// app/layout.tsx
<script
type="application/ld+json"
dangerouslySetInnerHTML={{
__html: JSON.stringify({
"@context": "https://schema.org",
"@type": "WebSite",
name: "Acme",
url: "https://example.com",
}),
}}
/>Frequently asked questions
Is structured data required for SEO?
Not required, but strongly recommended. Structured data enables rich results that increase click-through rates by 20-30%. Indxel treats it as optional (warning, not error) because pages can rank without it, but they rank better with it.
What schema types should I start with?
Start with WebSite and Organization on your root layout (every page gets them). Then add BreadcrumbList for navigation context, FAQPage for pages with Q&A sections, and Article for blog posts.