1
0
mirror of https://github.com/jbranchaud/til synced 2026-01-03 07:08:01 +00:00

Add Prevent Search Engines From Indexing A Page as an html til

This commit is contained in:
jbranchaud
2020-12-02 16:18:57 -06:00
parent f63957a358
commit 7e81696c52
2 changed files with 23 additions and 1 deletions

View File

@@ -9,7 +9,7 @@ and pairing with smart people at Hashrocket.
For a steady stream of TILs, [sign up for my newsletter](https://tinyletter.com/jbranchaud). For a steady stream of TILs, [sign up for my newsletter](https://tinyletter.com/jbranchaud).
_970 TILs and counting..._ _971 TILs and counting..._
--- ---
@@ -294,6 +294,7 @@ _970 TILs and counting..._
- [Adding Alt Text To An Image](html/adding-alt-text-to-an-image.md) - [Adding Alt Text To An Image](html/adding-alt-text-to-an-image.md)
- [Disable Auto-Completion For A Form Input](html/disable-auto-completion-for-a-form-input.md) - [Disable Auto-Completion For A Form Input](html/disable-auto-completion-for-a-form-input.md)
- [Prevent Search Engines From Indexing A Page](html/prevent-search-engines-from-indexing-a-page.md)
- [Render Text As Superscript](html/render-text-as-superscript.md) - [Render Text As Superscript](html/render-text-as-superscript.md)
- [Submit A Form With A Button Outside The Form](html/submit-a-form-with-a-button-outside-the-form.md) - [Submit A Form With A Button Outside The Form](html/submit-a-form-with-a-button-outside-the-form.md)

View File

@@ -0,0 +1,21 @@
# Prevent Search Engines From Indexing A Page
The `robots.txt` file is commonly used to tell (well-behaved) crawlers, such as
search engines, to not visit a page. If another page links to your page, it
will still be indexed. To instruct search engines to not index a given page,
robot meta tags need to be used.
> If you want to reliably block a page from showing up in the search results,
> you need to use a meta robots `noindex` tag. That means that, in order to
> find the `noindex` tag, the search engine has to be able to access that page,
> so dont block it with `robots.txt`.
> [source](https://yoast.com/ultimate-guide-robots-txt/)
To prevent indexing, add the following meta tag to the `<head>` section of any
relevant pages.
```html
<meta name="robots" content="noindex">
```
[source](https://developers.google.com/search/docs/advanced/crawling/block-indexing)