Rule: title-present
The title tag is the single most important on-page SEO element. It appears in browser tabs, search results, and social shares. A page without a title tag has no name in Google's index — search engines may auto-generate one from your content, and it's almost never what you want. This rule is critical: it blocks CI builds when the title is missing.
What it checks
Indxel extracts the <title> element from the page's HTML head. The rule passes if the title tag exists AND contains at least one non-whitespace character. An empty <title></title> or a title with only spaces fails. In Next.js App Router, the title comes from the metadata export or generateMetadata(). In static HTML, it's the <title> element in <head>. The SDK parses rendered HTML, so it works regardless of how your framework generates the title.
Thresholds
Title tag exists and is non-empty (at least 1 non-whitespace character)
Title tag is missing, empty, or contains only whitespace
Edge cases
A <title> tag containing only spaces or newlines is treated as empty and fails the rule.
If your layout.tsx sets a title.template but the page doesn't export a title, Next.js may render just the template (e.g., ' | Brand'). This passes title-present but will likely fail title-length.
Single-page apps (SPAs) that update the title via JavaScript after initial render: Indxel's static scanner checks the server-rendered HTML, so client-side title updates are not detected. Use generateMetadata() or server-side rendering.
Pages rendered inside iframes inherit the parent's title in browser tabs but have their own title in HTML. Indxel checks the page's own HTML.
Configuration
// indxel.config.ts
import { defineSEO } from "indxel";
export default defineSEO({
rules: {
"title-present": true, // enabled by default (critical)
},
});
// Disable in specific environments (not recommended):
export default defineSEO({
disabledRules: ["title-present"],
});Frequently asked questions
Can I disable the title-present rule in CI?
Technically yes, by adding it to disabledRules. But this is a critical rule for a reason — a missing title is a severe SEO defect. Disabling it means pages without titles ship to production undetected.
Does title-present check the content of the title?
No. title-present only checks existence. Title quality is handled by title-length (checks character count). The content must be at least 1 non-whitespace character to pass.
What if my SPA sets the title with JavaScript?
Indxel's static scanner checks server-rendered HTML. If your title is only set client-side, it won't be detected. Use server-side rendering or Next.js metadata API to ensure the title is in the initial HTML.