Besoin de modifier le fichier robots.txt - où se trouve-t-il ?

Correct me if I am wrong, but Latest is the default display but not the default link, right? This has to do with the actual /latest link

We have every single page of latest in the index, the content is like quicksand and there is nothing in the homepage that is “site specific” and not quicksand which is a big problem:

We absolutely do not want people landing on page 2 / 3 etc.. page 1 maybe, but the content on page 1 keeps on changing.

This URL for example https://meta.discourse.org/latest?no_definitions=true&no_subcategories=false&page=2 is stored in the Google index.

I am reticent to change stuff though cause I do not know how the big Google will deal with us adding “dont store in index” directives here. Also people never land on these pages anyway cause Google automatically detects they are rubbish and do not send people there.

If there is anything super positive here, I guess it would be having a wonderful “HTML off” homepage that has useful enough content that search engines would send people to the page.

For example, it would be super nice if discourse community discussions ranked meta.discourse.org first cause we had a nice front page.

A simple fix here we can make that can give us lots of mileage is nice expansion of pinned posts:

They are stable content, we can expand that:

In fact we can even expand it a bit further for crawler views. Additionally we could list all the categories on the home page as well in the crawler view… there is a bunch of stuff we can do.

Hello!
this is my file

# See http://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file
#
User-agent: *
Disallow: /auth/cas
Disallow: /auth/facebook/callback
Disallow: /auth/twitter/callback
Disallow: /auth/google/callback
Disallow: /auth/yahoo/callback
Disallow: /auth/github/callback
Disallow: /auth/cas/callback
Disallow: /assets/browser-update*.js
Disallow: /users/
Disallow: /u/
Disallow: /my/
Disallow: /badges/
Disallow: /search
Disallow: /search/
Disallow: /tags
Disallow: /tags/
Disallow: /email/
Disallow: /session
Disallow: /session/
Disallow: /admin
Disallow: /admin/
Disallow: /user-api-key
Disallow: /user-api-key/
Disallow: /*?api_key*
Disallow: /*?*api_key*
Disallow: /groups
Disallow: /groups/
Disallow: /t/*/*.rss
Disallow: /tags/*.rss
Disallow: /c/*.rss


User-agent: mauibot
Disallow: /


User-agent: bingbot
Crawl-delay: 60
Disallow: /auth/cas
Disallow: /auth/facebook/callback
Disallow: /auth/twitter/callback
Disallow: /auth/google/callback
Disallow: /auth/yahoo/callback
Disallow: /auth/github/callback
Disallow: /auth/cas/callback
Disallow: /assets/browser-update*.js
Disallow: /users/
Disallow: /u/
Disallow: /my/
Disallow: /badges/
Disallow: /search
Disallow: /search/
Disallow: /tags
Disallow: /tags/
Disallow: /email/
Disallow: /session
Disallow: /session/
Disallow: /admin
Disallow: /admin/
Disallow: /user-api-key
Disallow: /user-api-key/
Disallow: /*?api_key*
Disallow: /*?*api_key*
Disallow: /groups
Disallow: /groups/
Disallow: /t/*/*.rss
Disallow: /tags/*.rss
Disallow: /c/*.rss

I read the tutorials above but I do not understand how to fix the question “Need to edit robots.txt file - where is it?”. Looking forward to receiving help from the community

This is the content to be want to update

# See http://www.robotstxt.org/wc/norobots.html for documentation on how to use the robots.txt file
#
User-agent: *
Disallow: /auth/cas
Disallow: /auth/facebook/callback
Disallow: /auth/twitter/callback
Disallow: /auth/google/callback
Disallow: /auth/yahoo/callback
Disallow: /auth/github/callback
Disallow: /auth/cas/callback
Disallow: /assets/browser-update*.js
Disallow: /users/
Disallow: /u/
Disallow: /badges/
Disallow: /search
Disallow: /search/
Disallow: /tags
Disallow: /tags/

Thanks all

I think you can override the file in your own plugin.

My archive directory is this

how to override the file in your own plugin

Thanks

You will want to read the plugin development topics and then read this
https://meta.discourse.org/t/how-to-block-all-crawlers-but-googles/62431/4?u=cpradio

I really do not want to block the google search engine that I want to change by content in the robots.txt file

Why does my website not find such a directory /discourse/app/views ?

There is no robots.txt text file per se. It is a Ruby controller

You really need to read some of the Development topics, it explains all of that and more. The plugin should be trivial, to be honest. Or you can post something in Marketplace with a budget to see if someone will build it for you.

If that is added, could it be made into an overridable setting? I clicked on this link in the newsletter, because getting user pages indexed is also something we need. We’re hoping to add additional information to them and eventually redirect the old (indexed) user pages to the Discourse ones.

I was just noticing this problem on one of my Discourse sites. The way to block those dynamic URLs from bots while still allowing search engines to crawl /latest is this:

Disallow: /latest?

That will only block the dynamic ones, but not /latest, so search engines would still be able to see the latest content. I tested the rule in Google’s Webmaster Tools and it works.

Here’s an example of some of the dynamic URLs that are getting crawled on my site:

https://gist.githubusercontent.com/j127/d329c15dab45369b03321cad40448734/raw/300aa579b1386087b903da6aa52c52ff5d95828c/latest.txt

Is it possible to add that one line to robots.txt?

(Edit: I looked more closely at the file, and I wouldn’t use noindex there, at least on that dynamic rule. I’m pretty sure that Google has recommended not to use noindex in robots.txt though it was several years ago.)

Vous pouvez désormais bannir ou limiter les robots d’indexation abusifs via les paramètres du site, ce qui modifie indirectement le fichier robots.txt, mais nous ne fournissons toujours pas la possibilité d’une édition arbitraire.

Je pense que nous devrions le faire tout de même… @eviltrout, pouvez-vous définir la portée de cette fonctionnalité pour la version 2.4 ? Cela répond à de nombreuses demandes, dont beaucoup avec lesquelles nous ne sommes pas d’accord, mais mon attitude à ce sujet est : « C’est votre affaire, alors faites-le si vous le jugez nécessaire :skull_and_crossbones: ».

Peut-on au moins considérer la modification du fichier robots.txt comme étant totalement hors du champ du support communautaire ?

Pour information, n’importe qui peut facilement ajouter des règles supplémentaires grâce à un simple plugin utilisant le modèle de connecteur « robots_txt_index ». Par exemple : app/views/connectors/robots_txt_index/sitemap.html.erb

Voici comment je pense que cela devrait fonctionner :

  • Ajouter une nouvelle URL dans la section d’administration qui n’est pas liée directement. Par exemple /admin/customize/robots

    • Afficher un <textarea> contenant le contenu actuel du fichier robots.txt.

    • S’ils ne l’ont jamais modifié auparavant, le préremplir avec le contenu basé sur la liste blanche/noire.

    • Lorsque l’administrateur clique sur Enregistrer les modifications, cela doit être sauvegardé dans la base de données et remplacera le contenu existant de robots.txt pour ce forum.

Je suis fermement opposé à cette idée, car elle donne une place importante dans l’interface utilisateur à une option obscure et dangereuse.

Je pense que le chemin pour personnaliser robots.txt doit être personnalisé et saisi manuellement pour le moment. Si les utilisateurs le souhaitent, ils doivent rechercher sur Google ou Meta pour trouver le chemin.

C’est pourquoi je l’ai caché derrière « Édition avancée », mais si nous rendons l’interface obscure, je peux encore la simplifier (je modifierai ce message).

J’ai créé une PR pour cela :

Captures d’écran :

Ça a l’air bien ! Assurez-vous que le bouton « Annuler » utilise la bonne icône, la même que celle utilisée pour l’annulation dans les paramètres du site. Nous utilisons également le mot « Réinitialiser », vous pouvez donc réutiliser ce texte plutôt que d’en créer une nouvelle traduction.

image

Nous devons également ajouter des avertissements concernant les quelques paramètres du site qui modifient robots.txt et qui seront écrasés si vous les modifiez manuellement, etc.

La PR vient d’être fusionnée :tada:

Si vous mettez à jour vers la dernière version avec les tests validés, vous pourrez personnaliser le fichier robots.txt via /admin/customize/robots. Cette page n’est accessible depuis aucun lien de l’interface ; vous devrez copier-coller manuellement l’URL dans votre navigateur.

Remarque : si vous remplacez le fichier, tout changement ultérieur des paramètres du site qui modifie robots.txt (par exemple, whitelisted crawler user agents, etc.) ne s’appliquera plus au fichier (les paramètres seront enregistrés correctement, mais les modifications ne se refléteront pas dans robots.txt). Vous pouvez restaurer la version par défaut, auquel cas les paramètres du site s’appliqueront à nouveau au fichier.

Si des remplacements existent et qu’un administrateur consulte le fichier à l’adresse /robots.txt, un commentaire apparaîtra en haut indiquant la présence de remplacements, avec des liens permettant de modifier le fichier ou de revenir à la version par défaut.