Inspection Rules

Find out what rules are run when checking your links and why they exist.

Available Rules

Rules are based on the URL structure best practices for Google.

RuleDescription
absolute-site-urlsChecks for absolute links that are internal.
link-textEnsures link text is descriptive and meaningful.
missing-hashChecks for missing hashes in internal links.
no-baselessChecks for document relative links.
no-double-slashesChecks for double slashes in URLs.
no-duplicate-query-paramsChecks for duplicate query parameters in URLs.
no-error-responseChecks for error responses (4xx, 5xx) on internal links.
no-javascriptChecks for JavaScript links.
no-missing-hrefEnsures that a tags have an href attribute.
no-non-ascii-charsChecks for non-ASCII characters.
no-underscoresChecks for underscores.
no-uppercase-charsChecks for uppercase characters.
no-whitespaceChecks for whitespace.
trailing-slashChecks for trailing slashes on internal links.

absolute-site-urls

Checks for absolute links that are internal

Using relative paths is recommended as it makes your site more portable and easier to maintain.

<NuxtLink to="https://example.com/about">my page</NuxtLink>

Ensures link text is descriptive and meaningful.

Descriptive link text provide improved accessibility, allowing screen readers to better understand the context of the link. It includes link text such as "my page" or "Read more".

<NuxtLink to="/about">click here</NuxtLink>

missing-hash

Checks for missing Document Fragments for internal links.

Having valid hashes ensures that users are navigated to the correct section of the page, improving the user experience and accessibility.

<div id="valid-anchor"></div>
<NuxtLink to="#valid">my page</NuxtLink>

no-baseless

Document relative links are valid but can cause SEO maintenance issues when moving around your content.

It's recommended to use root relative links to avoid these issues.

<NuxtLink to="link">my page</NuxtLink>

no-double-slashes

Checks for double slashes in URLs.

Double slashes in URLs can cause canonicalization issues and can lead to duplicate content.

<NuxtLink to="/link//">my page</NuxtLink>

no-duplicate-query-params

Checks for duplicate query parameters in URLs.

Duplicate query parameters can cause issues with caching and can lead to duplicate content.

<NuxtLink to="/link?param=1&param=2">my page</NuxtLink>

no-error-response

Checks for error responses (4xx, 5xx) on internal links.

Ensuring that internal links do not lead to error responses improves the user experience and imporoves your sites crawlablity.

Note: This does not scan external links due to unpredictable network conditions.

<NuxtLink to="/broken-link">my page</NuxtLink>

no-javascript

Checks for JavaScript links.

JavaScript links provide poor user experience as they override the default browser behaviour.

It's recommended to use a <button type="button"> if you need an on click event.

<a href="javascript:doSomething()">my page</a>

no-missing-href

Ensures that links have an href attribute.

Having an href attribute is required for links to be accessible and usable. If you need a an anchor that doesn't navigate, use a <button> instead or the role="button" attribute.

<a>my page</a>

no-non-ascii-chars

Checks for non-ASCII characters in URLs.

Non-ASCII characters can cause issues with encoding and can lead to broken links.

<NuxtLink to="/my-ページ">my page</NuxtLink>

no-underscores

Checks for underscores in URLs.

Underscores are not recommended in URLs as they can cause issues with readability and SEO.

<NuxtLink to="/my_page">my page</NuxtLink>

no-uppercase-chars

Checks for uppercase characters in URLs.

Uppercase characters are not recommended in URLs as they can cause issues with readability and SEO.

<NuxtLink to="/MyPage">my page</NuxtLink>

no-whitespace

Checks for whitespace in URLs.

Whitespace in URLs can cause issues with encoding and can lead to broken links.

<NuxtLink to="/my page">my page</NuxtLink>

trailing-slash

Checks that internal links all either have or don't have a trailing slash depending on your configuration.

Inconsistent trailing slashes can cause issues with canonicalization and can lead to duplicate content.

<NuxtLink to="/my-page/">my page</NuxtLink>
Did this page help you?