Copied to clipboard

Flag this post as spam?

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

  • Jesper Skjønnemand 66 posts 441 karma points c-trib
    May 21, 2019 @ 10:53
    Jesper Skjønnemand

    change robotstxt to robots.txt

    I have created a simple Document Type for text files in order to create a robots.txt. This works very well. However, my node named robots.txt renders as /robotstxt (without the dot) in the URL, hence it is useless to crawlers. I wonder if there is a simple way to render the URL as robots.txt (with the dot) ?

    All the best

  • Jesper Skjønnemand 66 posts 441 karma points c-trib
    May 21, 2019 @ 10:54
    Jesper Skjønnemand

    Someone mentioned ~\Config\UrlRewriting.config but no such file seems to exist in my local clone.

  • Bo Jacobsen 602 posts 2400 karma points
    May 21, 2019 @ 12:37
    Bo Jacobsen

    Hi Jesper.

    If no such file exsist then i guess you are using Umbraco version +7.6?

    Then you use the web.config rewrite rules.

      If you wish to use IIS rewrite rules, see the documentation here:
  • Magnus Eriksson 122 posts 362 karma points
    May 21, 2019 @ 19:03
    Magnus Eriksson

    Best option would be to use URL Rewrite module in IIS. That rule would look like:

    <rule name="Robots" patternSyntax="Wildcard" stopProcessing="true">
      <match url="robots.txt" />
      <action type="Rewrite" url="/robotstxt" appendQueryString="false" />

    Regards, Magnus

Please Sign in or register to post replies

Write your reply to: