# Potentially bad value “noindex” for attribute “rel” on element “a”: Typo for “index”?

> Canonical HTML version: https://rocketvalidator.com/html-validation/potentially-bad-value-noindex-for-attribute-rel-on-element-a-typo-for-index
> Attribution: Rocket Validator (https://rocketvalidator.com)
> License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/)

The `rel` attribute on an `<a>` element has the value `noindex`, which is not a recognized link type. The validator matched it against the registered keywords and guessed it might be a misspelling of `index`.

In practice `noindex` is rarely a typo for `index`. Authors usually write `rel="noindex"` because they want to keep a page out of search results, but `rel` cannot do that. The attribute describes the relationship between the current document and the linked resource, not whether a page should be indexed.

Indexing is a page-level directive. To keep a page out of search results, add a robots meta tag to that page's `<head>`, or send the equivalent `X-Robots-Tag` HTTP header. Both apply to the page being excluded, not to a link pointing at it.

If your goal is to stop search engines from passing ranking through a link, the correct `rel` value is `nofollow`.

## Invalid example

```html
<a href="/private" rel="noindex">Members area</a>
```

## Valid example

Use `rel="nofollow"` on the link when you want search engines to ignore it:

```html
<a href="/private" rel="nofollow">Members area</a>
```

To keep the destination page itself out of search results, control indexing on that page instead:

```html
<meta name="robots" content="noindex">
```
