-
Hello,
How to update robot.txt ?
Thanks
-
Hello,
We apologize for the issue you are facing. To update your robots.txt file using Rank Math, you can follow these steps:
-
Access the Robots.txt Editor: Go to the Rank Math dashboard in your WordPress admin area and navigate to the General Settings section, then select Edit Robots.txt.
-
Add/Edit Code: In the available text area, you can add or edit the rules as you prefer. For example, you can add directives like
User-agent
,Disallow
, andAllow
to control how search engines crawl your site. -
Save Your Changes: After making the necessary changes, click on the Save Changes button at the bottom of the page.
Caution: Please be careful while making any changes to your robots.txt file, as incorrect settings can negatively impact your site’s visibility in search engines.
For more detailed information on the rules you can use in your robots.txt file, you can refer to our knowledgebase article.
If you have any specific issues or need further assistance, please reply to this ticket, and a human agent from our support team will assist you further.
Sources:
How to Edit Your Robots.txt With Rank Math SEO » Rank Math
How to Add Sitemaps to Robots.txt » Rank MathSi j’ajoute juste la ligne, est-ce que la configuration de base par defaut va être remplacer par juste cette ligne ?
Disallow: /wp-content/plugins/link-juice-optimizer/public/js/link-juice-optimizer.js
ou elle va être rajoute en plus ?Exemple 1:
User-agent: *
Disallow: /wp-admin/
Allow: /wp-admin/admin-ajax.php
Disallow: /wp-content/plugins/link-juice-optimizer/public/js/link-juice-optimizer.js
Sitemap: https://dev-web-agency.com/sitemap_index.xmlou Exemple 2:
Disallow: /wp-content/plugins/link-juice-optimizer/public/js/link-juice-optimizer.jsMerci d’avance,
CordialementCurrently I have added the disallow line “Disallow: /wp-content/plugins/link-juice-optimizer/public/js/link-juice-optimizer.js”
This gives this:
User agent: *
Disallow: /wp-admin/
Disallow: /wp-content/plugins/link-juice-optimizer/public/js/link-juice-optimizer.js
Allow: /wp-admin/admin-ajax.php
Sitemap: https://dev-web-agency.com/sitemap_index.xmlIs this correct according to you?
Thank you,
SincerelyHello,
Thank you for your patience.
Yes, once you start typing in the robots.txt, the default lines will be removed, so you need to type again our recommended rules.
The last format you shared is the correct one you should use:
User agent: * Disallow: /wp-admin/ Disallow: /wp-content/plugins/link-juice-optimizer/public/js/link-juice-optimizer.js Allow: /wp-admin/admin-ajax.php Sitemap: https://dev-web-agency.com/sitemap_index.xml
Looking forward to helping you.
D’accord merci, pour ce qui est de la search console, savez-vous pourquoi j’ai “0” dans les pages découverte ?
Voici l’url de l’image : https://imgur.com/a/wJr7gZBMerci d’avance,
CordialementHello,
Please note that the ‘Discovered Pages’ tab only shows the number of pages that were discovered using the sitemap, and since the sitemap is not the only tool Google uses to discover pages, the number of ‘Discovered Pages’ might differ from the number of pages on your sitemap.
In this case, it seems Google discovered all the pages without the sitemap. In fact, it could be a good sign, as it means that you have good internal linking and that Google does not need a sitemap to find some of your pages.
Don’t hesitate to let us know if you need our assistance with anything else.
D’accord je vous remercie
Hello,
We are glad that helped.
Please feel free to reach out to us again in case you need any other assistance.
We are here to help.
Thank you.
-
The ticket ‘how to add line in robot.txt’ is closed to new replies.