Robots.txt is not working with subfolder

#274134
Viewing 5 replies - 1 through 5 (of 5 total)
  • Anas
    Rank Math business

    Hello,

    Thank you for contacting Rank Math, and sorry for any inconvenience caused.

    Web crawlers will not read a robots.txt file in a subdirectory. The robots.txt should be placed for the top-level directory(the root domain).

    When a robot looks for the /robots.txt file for URL, it strips the path component from the URL (everything from the first single slash) and puts /robots.txt in its place.

    For example, for foxwebvision.com/blog/, it will remove the “/blog”, and replace it with /robots.txt, and will end up with foxwebvision.com/robots.txt.

    I have checked the robots.txt file of your root domain, it is correct and loading fine.

    I hope this helps. Looking forward to helping you.

    Hi,
    Thanks for your reply. Then how I can index my blog articles in search console? My /blog directory is not indexing in search console .

    Anas
    Rank Math business

    Hello,

    The blog page is automatically added to the post sitemap.

    I checked on Google, the blog page is already indexed and appearing in the search results:

    The blog posts are also correctly set to index, you need to wait for Google to crawl your website and index those URLs.

    I checked the sitemap, all the sitemaps are showing a 200 OK status:
    ok

    Please ensure that only 1 version of the sitemap is working (200 status), and the rest are redirecting to it. You can also use this tool to check. Please follow the steps in this link and redirect to the preferred version:
    https://rankmath.com/kb/couldnt-fetch-error-google-search-console/#5-check-for-the-correct-version-of-the-sitemap

    Then submit the sitemap in the sitemap section in the Search Console.

    I hope this helps. Looking forward to helping you.

    Thank you so much. Great Support

    Anas
    Rank Math business

    Hello,

    We are glad we addressed your concern. If you have any other questions in the future, know that we are here to help you.

    If you don’t mind me asking, could you please leave us a review (if you haven’t already) on https://wordpress.org/support/plugin/seo-by-rank-math/reviews/#new-post about your overall experience with Rank Math? We appreciate your time and patience.

    If you do have another question in the future, please feel free to create a new forum topic, and it will be our pleasure to assist you again.

    Thank you.

Viewing 5 replies - 1 through 5 (of 5 total)

The ticket ‘Robots.txt is not working with subfolder’ is closed to new replies.