How to Edit or Remove robots.txt on a WordPress powered website

16,994

Solution 1

You need to remove both lines from your robots.txt file. The robots file is located in the root directory of your web hosting folder, this normally can be found in /public_html/ and you should be able to edit or delete this file using:

Solution 2

If this is fresh install of Wordpress it could because you have set the privacy settings to stop search engines from crawling the site.

(and there will be no physical robots.txt on the server, as wordpress creates it on the fly)

Go to your settings in wordpress and see if this box is ticked:

enter image description here

If so, uncheck it and then the robots.txt should change to

User-agent: *
Disallow: 

If you still have issues and the robots.txt is still set to block crawlers, then explore the other option as outlined by Facet.

Share:
16,994

Related videos on Youtube

Facet
Author by

Facet

Updated on September 18, 2022

Comments

  • Facet
    Facet over 1 year

    When using Google's fetch test on my WordPress site, it reports that my robots.txt is blocking pages and resources from being indexed.

    Google reports that my Robots.txt looks like this:

    User-agent: *
    Disallow: /
    

    How can I resolve this issue?

    • Where can I find robots.txt?
    • How do I edit or remove this file?
  • Duarte Patrício
    Duarte Patrício over 7 years
    He didn't mention he had Yoast installed.
  • RamboNo5
    RamboNo5 about 6 years
    Thanks! That was my problem. I manually configured Apache to send an X-Robots-Tag with noindex in the http header. See this wordpress ticket: Search Engine Visibility option does not work as intended