Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Hans 8 posts 118 karma points
    Jan 17, 2023 @ 15:53
    Hans
    0

    I can't see Robots.txt! Help!

    Hello everybody! I am new in the Umbraco world.

    I can't manage to display my robots.txt file on my website. I have searched many forums and I can't find the specific solution. I need to be able to display it without creating any content in the Umbraco BackOffice, since the file is on the server.

    The "robots.txt" file is in dev-page/src/UmbracoProject and when I enter the url http://localhost:44395/robots.txt on loading I get a 404 error. enter image description here

  • Craig100 1136 posts 2523 karma points c-trib
    Jan 17, 2023 @ 17:02
    Craig100
    1

    Hi Hans,

    You need to put it in your wwwroot folder. Only stuff in that folder is directly accessible from the web. Hence why css/js files are in there.

    HTH

    Craig

  • Hans 8 posts 118 karma points
    Jan 17, 2023 @ 17:55
    Hans
    0

    Thanks Craig for replying.

    The problem is that google robots need the "robots.txt" file and they have to view it at "www.yourDomain.com/robots.txt".

    Do you know of any umbraco configuration that would allow me to display this text file?

  • Craig100 1136 posts 2523 karma points c-trib
    Jan 17, 2023 @ 18:13
    Craig100
    102

    Hi Hans,

    Exactly what I just said. If you put it in the wwwroot folder you will be able to access it at www.yourdomain.com/robots.txt. Give it a try and see what you get.

    Craig

  • Hans 8 posts 118 karma points
    Jan 17, 2023 @ 23:13
    Hans
    0

    You were right!

    I moved the file and it worked!

    Thank you so much!

Please Sign in or register to post replies

Write your reply to:

Draft