Our.Umbraco.Blend.RobotsTxt 13.0.1

dotnet add package Our.Umbraco.Blend.RobotsTxt --version 13.0.1                
NuGet\Install-Package Our.Umbraco.Blend.RobotsTxt -Version 13.0.1                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Our.Umbraco.Blend.RobotsTxt" Version="13.0.1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Our.Umbraco.Blend.RobotsTxt --version 13.0.1                
#r "nuget: Our.Umbraco.Blend.RobotsTxt, 13.0.1"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Our.Umbraco.Blend.RobotsTxt as a Cake Addin
#addin nuget:?package=Our.Umbraco.Blend.RobotsTxt&version=13.0.1

// Install Our.Umbraco.Blend.RobotsTxt as a Cake Tool
#tool nuget:?package=Our.Umbraco.Blend.RobotsTxt&version=13.0.1                

Blend RobotsTxt

License: MIT NuGet version (Our.Umbraco.Blend.RobotsTxt)

This is a lightweight package that enables /robots.txt root of the umbraco website. This package is configured using appSettings.

Installation in Umbraco CMS


Command Line

donet add package Our.Umbraco.Blend.RobotsTxt

Or Nuget

Install-Package Our.Umbraco.Blend.RobotsTxt

Setup


In the Startup.cs there is a configuration you need to add for /robots.txt path to render.

In the app.UseUmbraco() Under .WithEndpoints(u => add:

u.EndpointRouteBuilder.MapControllers();

This will use the route /robots.txt declared in the controller.

Default


If there are not any configurations in the appSettings.json file and no environment is found the default robots.txt will be:

User-agent: *
Allow: /
Disallow: /umbraco

If an environment is found and the name is Production the above will be rendered. For all other environments will be:

User-agent: *
Disallow: /

The /umbraco is global path that is set in appSettings. If this is set to a different path this path will update.

Configuration


In the root of your appSettings.json you can configure custom settings. You can also use appSettings.[Environment].json to have specific settings for every environment.

"Robots": [
    {
        "UserAgent": "*",
        "Allow": [ "/" ],
        "Disallow": [ "/umbraco" ],
        "Sitemap": "/sitemap.xml"
    }
]

Robots is an array of objects to be configured as needed to your use case.

UserAgent is an optional string. If left blank will use *.

Allow is an optional string array. Array of paths to allow.

Disallow is an optional string array. Array of paths not to allow.

Sitemap is an optional string. If left blank will not include.

If Allow and Disallow are both empty, will set to Allow: /

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
13.0.1 392 10/29/2024
13.0.0 4,331 1/25/2024
11.1.4 2,764 3/9/2023
11.1.3 254 3/9/2023
11.1.2 242 3/7/2023
11.1.1 301 1/31/2023
11.1.0 292 1/26/2023
11.0.4 305 1/26/2023
11.0.3 290 1/26/2023
11.0.2 295 1/25/2023
11.0.1 301 1/24/2023
10.0.1 710 8/17/2022
9.0.2 827 8/17/2022
9.0.1 581 5/10/2022