Umbraco CMS
CloudHeartcoreDXPMarketplace
14.latest
14.latest
  • Umbraco CMS Documentation
  • Legacy Documentation
    • Our Umbraco
    • GitHub
  • Release Notes
  • Contribute
  • Sustainability Best Practices
  • Fundamentals
    • Get to know Umbraco
    • Setup
      • Requirements
      • Installation
        • Install using .NET CLI
        • Running Umbraco in Docker using Docker Compose
        • Install using Visual Studio
        • Local IIS With Umbraco
        • Install using Visual Studio Code
        • Installing Nightly Builds
        • Running Umbraco on Linux/macOS
        • Unattended Installs
      • Upgrade your project
        • Version Specific Upgrades
          • Upgrade from Umbraco 8 to the latest version
          • Migrate content to Umbraco 8
          • Minor upgrades for Umbraco 8
          • Upgrade to Umbraco 7
          • Minor upgrades for Umbraco 7
      • Server setup
        • Running Umbraco On Azure Web Apps
        • Hosting Umbraco in IIS
        • File And Folder Permissions
        • Runtime Modes
        • Umbraco in Load Balanced Environments
          • Load Balancing Azure Web Apps
          • Standalone File System
          • Advanced Techniques With Flexible Load Balancing
          • Logging With Load Balancing
    • Backoffice
      • Sections
      • Property Editors
        • Built-in Property Editors
          • Checkbox List
          • Collection
          • Color Picker
          • Content Picker
          • Document Picker
          • DateTime
          • Date
          • Decimal
          • Email Address
          • Eye Dropper Color Picker
          • File Upload
          • Image Cropper
          • Label
          • Markdown Editor
          • Media Picker
          • Member Group Picker
          • Member Picker
          • Multi Url Picker
          • Repeatable Textstrings
          • Numeric
          • Radiobutton List
          • Slider
          • Tags
          • Textarea
          • Textbox
          • Toggle
          • User Picker
          • Block Editors
            • Block Grid
            • Block List
          • Dropdown
          • Rich Text Editor
            • Rich Text Editor Configuration
            • Rich Text Editor Styles
            • Rich Text Editor Plugins
            • Blocks in Rich Text Editor
      • Login
      • Document Blueprints
      • Sidebar
      • Log Viewer
      • Language Variants
      • Settings Dashboards
    • Data
      • Defining Content
        • Default Document Types
        • Document Type Localization
      • Creating Media
        • Default Data/Media Types
      • Members
      • Data Types
        • Default Data Types
      • Scheduled Publishing
      • Using Tabs
      • Users
      • Relations
      • Dictionary Items
      • Content Version Cleanup
    • Design
      • Templates
        • Basic Razor Syntax
        • Razor Cheatsheet
      • Rendering Content
      • Rendering Media
      • Partial Views
      • Stylesheets And JavaScript
    • Code
      • Service APIs
      • Subscribing To Notifications
      • Creating Forms
      • Debugging
        • Logging
      • Source Control
  • Implementation
    • Learn how Umbraco works
    • Routing
      • Controller & Action Selection
      • Execute Request
      • Request Pipeline
    • Custom Routing
      • Adding a hub with SignalR and Umbraco
    • Controllers
    • Data Persistence (CRUD)
    • Composing
    • Integration Testing
    • Nullable Reference Types
    • Services and Helpers
      • Circular Dependencies
    • Unit Testing
  • Customizing
    • Extend and customize the editing experience
    • Project Bellissima
    • Setup Your Development Environment
      • Vite Package Setup
    • Foundation
      • Working with Data
        • Repositories
        • Context API
        • Store
        • States
      • Contexts
        • Property Dataset Context
      • Umbraco Element
        • Controllers
          • Write your own controller
      • Sorting
      • Routes
      • Icons
      • Backoffice Localization
      • Terminology
    • Extension Overview
      • Extension Registry
        • Extension Registration
        • Extension Manifest
      • Extension Types
        • Menu
        • Header Apps
        • Icons
        • Modals
          • Confirm Dialog
          • Custom Modals
          • Route Registration
        • Bundle
        • Kind
        • Backoffice Entry Point
        • Extension Conditions
        • Dashboards
        • Entity Actions
        • Entity Bulk Actions
        • Entity Create Option Action
        • Trees
        • Global Context
        • Section Sidebar
        • Section View
        • Sections
        • Workspace Context
        • Workspace Views
        • Workspace Actions
        • Localization
      • Extension Kind
      • Extension Conditions
      • Custom Extension types
    • Sections & Trees
    • Searchable Trees (ISearchableTree)
    • Property Editors
      • Property Editors Composition
        • Property Editor Schema
        • Property Editor UI
      • Property Value Converters
      • Property Actions
      • Integrate Property Editors
      • Tracking References
      • Content Picker Value Converter Example
      • Property Dataset
      • Integrate Validaction
    • Workspaces
    • Umbraco Package
    • UI Library
  • Extending
    • Build on Umbraco functionality
    • Health Check
      • Health Check Guides
        • Click-Jacking Protection
        • Content Content Security Policy (CSP)
        • Content/MIME Sniffing Protection
        • Cross-site scripting Protection (X-XSS-Protection header)
        • Debug Compilation Mode
        • Excessive Headers
        • Fixed Application Url
        • Folder & File Permissions
        • HTTPS Configuration
        • Notification Email Settings
        • SMTP
        • Strict-Transport-Security Header
    • Language Files & Localization
      • .NET Localization
    • Backoffice Search
    • Creating a Custom Database Table
    • Embedded Media Providers
    • Custom File Systems (IFileSystem)
      • Using Azure Blob Storage for Media and ImageSharp Cache
    • Configuring Azure Key Vault
    • Packages
      • Creating a Package
      • Language file for packages
      • Listing a Package on the Umbraco Marketplace
      • Good practice and defaults
      • Packages on Umbraco Cloud
      • Installing and Uninstalling Packages
      • Maintaining packages
      • Create accessible Umbraco packages
      • Example Package Repository
  • Reference
    • Dive into the code
    • Configuration
      • Basic Authentication Settings
      • Connection strings settings
      • Content Dashboard Settings
      • Content Settings
      • Data Types Settings
      • Debug settings
      • Examine settings
      • Exception filter settings
      • FileSystemProviders Configuration
      • Global Settings
      • Health checks
      • Hosting settings
      • Imaging settings
      • Indexing settings
      • Install Default Data Settings
      • Logging settings
      • Maximum Upload Size Settings
      • Models builder settings
      • NuCache Settings
      • Package Migration
      • Plugins settings
      • Request handler settings
      • Runtime settings
      • Security Settings
      • Serilog settings
      • Type finder settings
      • Unattended
      • Web routing
    • Templating
      • Models Builder
        • Introduction
        • Configuration
        • Builder Modes
        • Understand and Extend
        • Using Interfaces
        • Tips and Tricks
      • Working with MVC
        • Working with MVC Views in Umbraco
        • View/Razor Examples
        • Using MVC Partial Views in Umbraco
        • Using View Components in Umbraco
        • Querying & Traversal
        • Creating Forms
      • Macros
    • Querying & Models
      • IMemberManager
      • IPublishedContentQuery
      • ITagQuery
      • UDI Identifiers
      • UmbracoContext helper
      • UmbracoHelper
      • IPublishedContent
        • IPublishedContent Collections
        • IPublishedContent IsHelpers
        • IPublishedContent Property Access & Extension Methods
    • Routing & Controllers
      • Custom MVC controllers (Umbraco Route Hijacking)
      • Custom MVC Routes
      • Custom Middleware
      • URL Rewrites in Umbraco
      • Special Property Type aliases for routing
      • URL Redirect Management
      • Routing in Umbraco
        • FindPublishedContentAndTemplate()
        • IContentFinder
        • Inbound request pipeline
        • Outbound request pipeline
        • Published Content Request Preparation
      • Surface controllers
        • Surface controller actions
      • Umbraco API Controllers
        • Porting old Umbraco API Controllers
    • Content Delivery API
      • Custom property editors support
      • Extension API for querying
      • Media Delivery API
      • Protected content in the Delivery API
      • Output caching
      • Property expansion and limiting
      • Additional preview environments support
    • Webhooks
      • Expanding Webhook Events
    • API versioning and OpenAPI
    • Searching
      • Examine
        • Examine Management
        • Examine Manager
        • Custom indexing
        • PDF indexes and multisearchers
        • Quick-start
    • Using Notifications
      • Notification Handler
      • CacheRefresher Notifications Example
      • ContentService Notifications Example
      • Creating And Publishing Notifications
      • Determining if an entity is new
      • MediaService Notifications Example
      • MemberService Notifications Example
      • Sending Allowed Children Notification
      • Umbraco Application Lifetime Notifications
      • EditorModel Notifications
        • Customizing the "Links" box
      • Hot vs. cold restarts
    • Inversion of Control / Dependency injection
    • Management
      • Using Umbraco services
        • Consent Service
        • Media Service
        • Relation Service
        • Content Service
        • Content Type Service
        • Localization Service
        • User Service
    • Plugins
      • Creating Resolvers
      • Finding types
    • Cache & Distributed Cache
      • Accessing the cache
      • ICacheRefresher
      • IServerMessenger
      • Getting/Adding/Updating/Inserting Into Cache
      • Examples
        • Working with caching
    • Response Caching
    • Security
      • API rate limiting
      • BackOfficeUserManager and Events
      • Cookies
      • Replacing the basic username/password check
      • External login providers
      • Locking of Users and password reset
      • Reset admin password
      • Umbraco Security Hardening
      • Umbraco Security Settings
      • Sensitive data
      • Sanitizing the Rich Text Editor
      • Setup Umbraco for a FIPS Compliant Server
      • HTTPS
      • Two-factor Authentication
      • Server-side file validation
    • Scheduling
    • Common Pitfalls & Anti-Patterns
    • API Documentation
    • Debugging with SourceLink
    • Language Variation
    • UmbracoMapper
    • Distributed Locks
    • Management API
      • Setup OAuth using Postman
    • Custom Swagger API
    • Umbraco Flavored Markdown
  • Tutorials
    • Overview
    • Creating a Basic Website
      • Getting Started
      • Document Types
      • Creating Your First Template
      • CSS and Images
      • Displaying the Document Type Properties
      • Creating a Master Template
      • Creating Pages and Using the Master Template
      • Setting the Navigation Menu
      • Articles and Article Items
      • Adding Language Variants
      • Conclusions
    • Creating your First Extension
    • Creating a Custom Dashboard
      • Adding localization to the dashboard
      • Adding functionality to the Dashboard
      • Using Umbraco UI library in the Dashboard
    • Creating a Property Editor
      • Adding configuration to a Property Editor
      • Integrating context with a Property Editor
      • Custom value conversion for rendering
      • Adding server-side validation
        • Default Property Editor Schema aliases
    • Creating a Multilingual Site
    • Add Google Authentication (Users)
    • Add Microsoft Entra ID authentication (Members)
    • Creating Custom Database Tables with Entity Framework
    • The Starter Kit
      • Lessons
        • Customize the Starter Kit
        • Add a Blog Post Publication Date
          • Add a Blog Post Publication Date
          • Add a Blog Post Publication Date
        • Add Open Graph
          • Add Open Graph - Step 1
          • Add Open Graph - Step 2
          • Add Open Graph - Step 3
          • Add Open Graph - Step 4
          • Add Open Graph - Summary
        • Ask For Help and Join the Community
    • Editor's Manual
      • Getting Started
        • Logging In and Out
        • Umbraco Interface
        • Creating, Saving and Publishing Content Options
        • Finding Content
        • Editing Existing Content
        • Sorting Pages
        • Moving a Page
        • Copying a Page
        • Deleting and Restoring Pages
      • Working with Rich Text Editor
      • Version Management
        • Comparing Versions
        • Rollback to a Previous Version
      • Media Management
        • Working with Folders
        • Working with Media Types
        • Cropping Images
      • Tips & Tricks
        • Refreshing the Tree View
        • Audit Trail
        • Notifications
        • Preview Pane Responsive View
        • Session Timeout
    • Multisite Setup
    • Member Registration and Login
    • Custom Views for Block List
    • Connecting Umbraco Forms and Zapier
    • Creating an XML Sitemap
    • Implement Custom Error Pages
    • Create a custom maintenance page
    • Creating a backoffice API
      • Documenting your controllers
      • Adding a custom Swagger document
      • Versioning your API
      • Polymorphic output in the Management API
      • Umbraco schema and operation IDs
      • Access policies
Powered by GitBook
On this page
  • Built-in checks
  • Configuring and scheduling checks
  • Custom checks
  • Configuration checks
  • General checks
  • Custom health check notifications
Edit on GitHub
Export as PDF
  1. Extending

Health Check

Health Checks are used to determine the state of your Umbraco project. Learn more about each of them in this section.

PreviousBuild on Umbraco functionalityNextHealth Check Guides

Last updated 8 months ago

The Settings section of the Umbraco backoffice holds a dashboard named "Health Check". It is a handy list of checks to see if your Umbraco installation is configured according to best practices. It's possible to add your custom-built health checks.

For inspiration when building your checks you can look at the checks we've , as well as our . Some examples will follow in this document.

Built-in checks

Umbraco comes with the following checks by default:

  • Category Configuration

    • Notification Email Settings (id: 3E2F7B14-4B41-452B-9A30-E67FBC8E1206) - checks that the "from" email address used for email notifications has been changed from its default value

  • Category Data Integrity

    • Database data integrity check (id: 73DD0C1C-E0CA-4C31-9564-1DCA509788AF) - checks for various data integrity issues in the Umbraco database

  • Category Live Environment

    • Debug Compilation Mode (id: 61214FF3-FC57-4B31-B5CF-1D095C977D6D) - should be set to debug="false" on your live site

    • Runtime Mode (id: 8E31E5C9-7A1D-4ACB-A3A8-6495F3EDB932) - should be set to Production on your live site

  • Category Permissions

    • Folder & File Permissions (id: 53DBA282-4A79-4B67-B958-B29EC40FCC23) - checks that the folders and files set with write permissions that are either required or recommended can be accessed

  • Category Security

    • Application URL Configuration (id: 6708CA45-E96E-40B8-A40A-0607C1CA7F28) - checks if the Umbraco application URL is configured for your site.

    • Click-Jacking Protection (id: ED0D7E40-971E-4BE8-AB6D-8CC5D0A6A5B0) - checks to see if a header or meta-tag is in place to indicate whether the site can be hosted in an IFRAME. Normally this is best set to deny permission for this to be done, to prevent what is known as attacks

    • Content/MIME Sniffing Protection (id: 1CF27DB3-EFC0-41D7-A1BB-EA912064E071) - checks that your site contains a header used to protect against Multipurpose Internet Mail Extensions (MIME) sniffing vulnerabilities

    • Cookie hijacking and protocol downgrade attacks Protection (HSTS) (id: E2048C48-21C5-4BE1-A80B-8062162DF124) - checks if your HTTPS site contains the Strict-Transport-Security Header (HSTS). If not - adds with a default of 18 weeks

    • Cross-site scripting Protection (id: F4D2B02E-28C5-4999-8463-05759FA15C3A) - checks for the presence of the X-XSS-Protection-header

    • Excessive Headers (id: 92ABBAA2-0586-4089-8AE2-9A843439D577) - checks to ensure that various headers that can provide details about the technology used to build and host the website have been removed

    • HTTPS Configuration (id: EB66BB3B-1BCD-4314-9531-9DA2C1D6D9A7) - to determine if the current site is running on a secure connection

    • UseHttps check - when the site is running on HTTPS, Umbraco.Cms.Core.Configuration.Models.GlobalSettings.UseHttps needs to be enabled to secure the backoffice. The setting can be found under Umbraco:CMS:Global in the appsettings.json file

  • Category Services

    • SMTP Settings (id: 1B5D221B-CE99-4193-97CB-5F3261EC73DF) - checks that an Simple Mail Tranfer Protocol (SMTP) server is configured and is accepting requests for sending emails

Each check returns a message indicating whether or not the issue in question has been found on the website installation. This could be an error that should be fixed, or a warning you should be aware of.

Some of them can also be rectified via the dashboard, by clicking the Fix button and in some cases providing some required information. These changes usually involve writing to configuration files that will often trigger a restart of the website.

Configuring and scheduling checks

As well as viewing the results of health checks via the Settings section dashboard, you can set up the checks to be run on a schedule and be notified of the results by email. It's also possible to disable certain checks if they aren't applicable in your environment.

Custom checks

You can build your own health checks. There are two types of health checks you can build: configuration checks and general checks.

Each health check is a class that needs to have a HealthCheck attribute. This attribute has a few things you need to fill in:

  • GUID - a unique ID that you've generated for this specific check

  • Name - give it a short name so people know what the check is for

  • Description - describes what the check does in detail

  • Group - this is the category for the check if you use an existing group name (like "Configuration") the check will be added in that category, otherwise a new category will appear in the dashboard

Configuration checks

  • A configuration check needs to inherit from Umbraco.Cms.Core.HealthChecks.Checks.AbstractSettingsCheck

  • A configuration check needs the HealthCheck attribute as noted at the start of this document

  • ReadMoreLink is a link to an external guide that will help you to troubleshoot any problems

  • ValueComparisonType can either be ValueComparisonType.ShouldEqual or ValueComparisonType.ShouldNotEqual

  • ItemPath is the IConfiguration key path leading to the configuration value that you want to verify

  • Values is a list of values that are available for this configuration item - in this example it can be RemoteOnly or On, they're both acceptable for a live site.

    • For checks using the ShouldEqual comparison method, make sure to set one of these values to IsRecommended = true.

    • Where ShouldNotEqual is used the fix will require the user to provide the correct setting

  • CurrentValue is the current value from the configuration setting

  • CheckSuccessMessage and CheckErrorMessage are the messages returned to the user

    • It is highly recommended to use the LocalizedTextService so these can be localized. You can add the text in ~/Config/Lang/en-US.user.xml (or whatever language you like)

General checks

This can be anything you can think of, the results and the rectify action are completely under your control.

  • A general check needs to inherit from Umbraco.Cms.Core.HealthChecks.HealthCheck

  • A general check needs the HealthCheck attribute as noted at the start of this document

  • All checks run when the dashboard is loaded, this means that the GetStatus() method gets executed

    • You can return multiple status checks from GetStatus()

  • A status check returns a HealthCheckStatus

    • If a HealthCheckStatus has a HealthCheckAction defined then the "Fix" button will perform that action once clicked

    • Sometimes, the button to fix something should not be called "Fix", change the Name property of a HealthCheckAction to provide a better name

    • HealthCheckAction has a Description property so that you can provide information on what clicking the "Rectify" button will do (or provide links to documentation, for example)

    • HealthCheckStatus has a few result levels:

      • StatusResultType.Success

      • StatusResultType.Error

      • StatusResultType.Warning

      • StatusResultType.Info

    • A HealthCheckAction needs to provide an alias for an action that can be picked up in the ExecuteAction method

  • It is highly recommended to use the LocalizedTextService so text can be localized. You can add the text in ~/Config/Lang/en-US.user.xml (or whatever language you like)

An example check:

using Umbraco.Cms.Core.Extensions;
using Umbraco.Cms.Core.HealthChecks;
using Umbraco.Cms.Core.Services;

namespace Umbraco.Web.HealthCheck.Checks.SEO;

[HealthCheck("3A482719-3D90-4BC1-B9F8-910CD9CF5B32", "Robots.txt",
 Description = "Create a robots.txt file to block access to system folders.",
 Group = "SEO")]
public class HealthCheckNotifier : Cms.Core.HealthChecks.HealthCheck
{
 private readonly IHostEnvironment _hostEnvironment;
 private readonly ILogger<HealthCheckNotifier> _logger;
 private readonly ILocalizedTextService _textService;

 public HealthCheckNotifier(ILocalizedTextService textService, IHostEnvironment hostEnvironment,
  ILogger<HealthCheckNotifier> logger)
 {
  _textService = textService;
  _hostEnvironment = hostEnvironment;
  _logger = logger;
 }

 public override Task<IEnumerable<HealthCheckStatus>> GetStatus() =>
  Task.FromResult((IEnumerable<HealthCheckStatus>)new[] { CheckForRobotsTxtFile() });

 public override HealthCheckStatus ExecuteAction(HealthCheckAction action)
 {
  switch (action.Alias)
  {
   case "addDefaultRobotsTxtFile":
    return AddDefaultRobotsTxtFile();
   default:
    throw new InvalidOperationException("Action not supported");
  }
 }

 private HealthCheckStatus CheckForRobotsTxtFile()
 {
  var success = File.Exists(_hostEnvironment.MapPathContentRoot("~/robots.txt"));
  var message = success
   ? _textService.Localize("healthcheck", "seoRobotsCheckSuccess")
   : _textService.Localize("healthcheck", "seoRobotsCheckFailed");

  var actions = new List<HealthCheckAction>();

  if (success == false)
  {
   actions.Add(new HealthCheckAction("addDefaultRobotsTxtFile", Id)
   // Override the "Rectify" button name and describe what this action will do
   {
    Name = _textService.Localize("healthcheck", "seoRobotsRectifyButtonName"),
    Description = _textService.Localize("healthcheck", "seoRobotsRectifyDescription")
   });
  }

  return
   new HealthCheckStatus(message)
   {
    ResultType = success ? StatusResultType.Success : StatusResultType.Error,
    Actions = actions
   };
 }

 private HealthCheckStatus AddDefaultRobotsTxtFile()
 {
  var success = false;
  var message = string.Empty;
  const string content = @"# robots.txt for Umbraco
User-agent: *
Disallow: /umbraco/";

  try
  {
   File.WriteAllText(_hostEnvironment.MapPathContentRoot("~/robots.txt"), content);
   success = true;
  }
  catch (Exception exception)
  {
   _logger.LogError(exception, "Could not write robots.txt to the root of the site");
  }

  return
   new HealthCheckStatus(message)
   {
    ResultType = success ? StatusResultType.Success : StatusResultType.Error,
    Actions = new List<HealthCheckAction>()
   };
 }
}

Custom health check notifications

Each notification method needs to implement the core interface IHealthCheckNotificationMethod and, for ease of creation, can inherit from the base class NotificationMethodBase, which itself implements the IHealthCheckNotificationMethod interface. The class must also be decorated with an instance of the HealthCheckNotificationMethod attribute. There's one method to implement - SendAsync(HealthCheckResults results) - which is responsible for taking the results of the health checks and sending them via the mechanism of your choice.

The following example shows how the core method for sending notification via email is implemented:

using Microsoft.Extensions.Options;
using Umbraco.Cms.Core.Configuration.Models;
using Umbraco.Cms.Core.Mail;
using Umbraco.Cms.Core.Models.Email;
using Umbraco.Cms.Core.Services;

namespace Umbraco.Cms.Core.HealthChecks.NotificationMethods;

[HealthCheckNotificationMethod("email")]
public class EmailNotificationMethod : NotificationMethodBase
{
 private readonly ILocalizedTextService? _textService;
 private readonly IHostEnvironment? _hostEnvironment;
 private readonly IEmailSender? _emailSender;
 private readonly IMarkdownToHtmlConverter? _markdownToHtmlConverter;
 private ContentSettings? _contentSettings;

 public EmailNotificationMethod(
  ILocalizedTextService textService,
  IHostEnvironment hostEnvironment,
  IEmailSender emailSender,
  IOptionsMonitor<HealthChecksSettings> healthChecksSettings,
  IOptionsMonitor<ContentSettings> contentSettings,
  IMarkdownToHtmlConverter markdownToHtmlConverter)
  : base(healthChecksSettings)
 {
  var recipientEmail = Settings?["RecipientEmail"];
  if (string.IsNullOrWhiteSpace(recipientEmail))
  {
   Enabled = false;
   return;
  }

  RecipientEmail = recipientEmail;

  _textService = textService ?? throw new ArgumentNullException(nameof(textService));
  _hostEnvironment = hostEnvironment;
  _emailSender = emailSender;
  _markdownToHtmlConverter = markdownToHtmlConverter;
  _contentSettings = contentSettings.CurrentValue ?? throw new ArgumentNullException(nameof(contentSettings));

  contentSettings.OnChange(x => _contentSettings = x);
 }

 public string? RecipientEmail { get; }

 public override async Task SendAsync(HealthCheckResults results)
 {
  if (ShouldSend(results) == false)
  {
   return;
  }

  if (string.IsNullOrEmpty(RecipientEmail))
  {
   return;
  }

  var message = _textService?.Localize("healthcheck", "scheduledHealthCheckEmailBody", new[]
  {
   DateTime.Now.ToShortDateString(),
   DateTime.Now.ToShortTimeString(),
   _markdownToHtmlConverter?.ToHtml(results, Verbosity)
  });

  // Include the Umbraco Application URL host in the message subject so that
  // you can identify the site that these results are for.
  var host = _hostEnvironment?.ContentRootPath?.ToString();

  var subject = _textService?.Localize("healthcheck", "scheduledHealthCheckEmailSubject", new[] { host });


  var mailMessage = CreateMailMessage(subject, message);
  Task? task = _emailSender?.SendAsync(mailMessage, Constants.Web.EmailTypes.HealthCheck);
  if (task is not null)
  {
   await task;
  }
 }

 private EmailMessage CreateMailMessage(string? subject, string? message)
 {
  var to = _contentSettings?.Notifications.Email;

  if (string.IsNullOrWhiteSpace(subject))
   subject = "Umbraco Health Check Status";

  var isBodyHtml = message.IsNullOrWhiteSpace() == false && message!.Contains("<") && message.Contains("</");
  return new EmailMessage(to, RecipientEmail, subject, message, isBodyHtml);
 }
}

If a custom configuration is required for a custom notification method, the following extract can be merged in the appsettings.json file, which will enable the email notification method to be configured:

{
 "Umbraco": {
    "CMS": {
      "HealthChecks": {
        "Notification": {
          "Enabled": true,
          "NotificationMethods": {
            "email": {
              "Enabled": true,
              "Settings": {
                "RecipientEmail" : "alerts@mywebsite.tld"
              }
            }
          }
        }
      }
    }
  }
}

If you want to get the notifications by email, Simple Mail Tranfer Protocol (SMTP) settings should also be configured in the same JSON file.

For more information, see the article.

These are small checks that take an key and confirm that the value that's expected is there. If the value is not correct, there will be a link to a guide on how to set this value correct.

Health check notifications can be scheduled to run periodically and notify you of the results. Included with Umbraco is a notification method to deliver the results via email. In a similar manner to how it's possible to create your health checks, you can also create custom notification methods to send the message summarising the status of the health checks via other means. Again, for further details on implementing this please refer to the .

built into Umbraco
guides
click-jacking
Reference > Configuration > Health checks
IConfiguration
existing notification methods within the core code base