• Resolved sergejsk

    (@sergejsk)


    Hello!

    I’m working with xampp in the local environment and then building a static site and hosting it to Cloudflare pages.
    I noticed that I was missing the robots.txt file both in the localhost and CF pages.
    I have installed the SEO Framework plugin and made some settings adjustments to robots.txt settings. I have a file – robots.php, but it won’t make a robots.txt file.

    It might be not a plugin issue, but maybe the Xampp/localhost setup I’m using, I don’t know.

    Also, I have read that robots.txt is a dynamic file and is generated when requested.
    I have created manually robots.txt and placed it in the root folder and now it works. But it’s generic, without those settings I have set up in The SEO framework plugin. If I copy directly from robots.php to my robots.txt, it doesn’t work.


    Any suggestions on what might be wrong and what solution I could use?

    Thanks in advance.

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Sybre Waaijer

    (@cybr)

    Hello!

    WordPress generates the robots.txt “file” virtually, and TSF augments WordPress’s content.

    If you put an actual file in the root directory of your site, the server should display that. If you use a file, neither WordPress nor TSF can dynamically populate the contents for you.

    I’m unsure what you wanted to do with “robots.php,” but that isn’t a part of TSF.

    There are advanced filters if you wish to append content to dynamic robots.txt output. Alternatively, you can use this plugin: https://wordpress.org/plugins/robots-txt-quick-editor/.

    Thread Starter sergejsk

    (@sergejsk)

    Hello!

    Thank you. For now I’ll use my own file and edit it, that’s enough.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Robots.txt missing on localhost’ is closed to new replies.