Umbraco CMS
CloudHeartcoreDXPMarketplace
13.latest (LTS)
13.latest (LTS)
  • Umbraco CMS Documentation
  • Legacy Documentation
    • Umbraco 11 Documentation
    • Umbraco 8 Documentation
    • Umbraco 7 Documentation
  • Release Notes
  • Contribute
  • Sustainability Best Practices
  • Fundamentals
    • Get to know Umbraco
    • Setup
      • Requirements
      • Installation
        • Install using .NET CLI
        • 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
          • Color Picker
          • Content Picker
          • DateTime
          • Date
          • Decimal
          • Email Address
          • Eye Dropper Color Picker
          • File Upload
          • Image Cropper
          • Label
          • List View
          • Markdown Editor
          • Media Picker
          • Media Picker (Legacy)
          • Member Group Picker
          • Member Picker
          • Multi Url Picker
          • Multinode Treepicker
          • Repeatable Textstrings
          • Numeric
          • Radiobutton List
          • Slider
          • Tags
          • Textarea
          • Textbox
          • Toggle
          • User Picker
          • Block Editors
            • Block Grid
            • Block List
            • Build a Custom View for a Block
            • Configuring Block Editor Label Properties
          • Dropdown
          • Grid Layout (Legacy)
            • What Are Grid Layouts?
            • Configuring The Grid Layout
            • Settings And Styling
            • Grid Editors
            • Build Your Own Editor
            • Rendering Grid In a Template
            • Grid Layout Best Practices
            • Add Values Programmatically
          • Rich Text Editor
            • Rich Text Editor Configuration
            • Rich Text Editor Styles
            • Rich Text Editor Plugins
            • Blocks in Rich Text Editor
      • Login
      • Content Templates
      • Infinite Editing
      • 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
        • Named Sections
        • Razor Cheatsheet
      • Rendering Content
      • Rendering Media
      • Partial Views
      • Partial View Macro Files
      • 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
  • Extending
    • Customize the editing experience
    • Dashboards
    • Sections & Trees
      • Sections
      • Trees
        • Tree Actions
      • Searchable Trees (ISearchableTree)
    • Property Editors
      • Property Value Converters
      • Property Actions
      • Tracking References
      • Declaring your property editor
      • Content Picker Value Converter Example
    • Package Manifest
    • Macro Parameter Editors
    • Health Check
      • Health Check Guides
        • Click-Jacking Protection
        • 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
        • Macro Errors
        • Notification Email Settings
        • SMTP
        • Strict-Transport-Security Header
    • Language Files & Localization
    • Backoffice Search
    • Backoffice Tours
    • Backoffice UI API Documentation
    • Content Apps
    • 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
    • UI Library
  • 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
      • Keep alive settings
      • Logging settings
      • Maximum Upload Size Settings
      • Models builder settings
      • NuCache Settings
      • Package Migration
      • Plugins settings
      • Request handler settings
      • Rich text editor settings
      • Runtime minification settings
      • Runtime settings
      • Security Settings
      • Serilog settings
      • Tours settings
      • Type finder settings
      • Unattended
      • Web routing
    • Templating
      • Macros
        • Managing macros
        • Partial View Macros
      • 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
    • Querying & Models
      • IMemberManager
      • IPublishedContentQuery
      • ITagQuery
      • UDI Identifiers
      • UmbracoContext helper
      • UmbracoHelper
      • IPublishedContent
        • IPublishedContent Collections
        • IPublishedContent IsHelpers
        • IPublishedContent Property Access & Extension Methods
    • Routing & Controllers
      • Routing requirements for backoffice authentication
      • 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
        • Umbraco Api - Authorization
        • Umbraco Api - Routing & Urls
    • 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
      • Models Reference
        • Content
        • ContentType
        • DataType
        • DictionaryItem
        • Language
        • Media
        • MediaType
        • Relation
        • RelationType
        • ServerRegistration
        • Template
      • Services Reference
        • AuditService
        • ConsentService
        • DataTypeService
        • DomainService
        • EntityService
        • ExternalLoginService
        • FileService
        • MacroService
        • MediaService
        • MemberGroupService
        • MemberService
        • MemberTypeService
        • NotificationService
        • PackagingService
        • PublicAccessService
        • RedirectUrlService
        • RelationService
        • ServerRegistrationService
        • TagService
        • TextService
        • ContentService
          • Create content programmatically
          • Publish content programmatically
        • ContentTypeService
          • Retrieving content types
          • Retrieving content types
        • LocalizationService
          • Retrieving languages
        • UserService
          • Creating a user
    • 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
    • AngularJS
      • Directives
        • umbLayoutSelector
        • umbLoadIndicator
        • umbProperty
      • Services
        • Editor Service
        • Events Service
          • changeTitle
  • 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 a Custom Dashboard
      • Extending the Dashboard using the Umbraco UI library
    • Creating a Property Editor
      • Adding configuration to a property editor
      • Integrating services with a property editor
      • Adding server-side data to a property editor
    • Creating a Multilingual Site
    • Add Google Authentication (Users)
    • Add Microsoft Entra ID authentication (Members)
    • Creating a Backoffice Tour
    • 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
    • Implementing Custom Error Pages
Powered by GitBook
On this page
  • Root level settings
  • Allow edit invariant from non-default
  • Allowed upload file extensions
  • Allowed media hosts
  • Disable delete when referenced
  • Disable unpublish when referenced
  • Disallowed upload files
  • Error 404 collection
  • Hide backoffice logo
  • Login background image
  • Login logo image
  • Macro errors
  • Preview badge
  • Resolve urls from text string
  • Show deprecated property editors
  • Show domain warnings
  • Show unroutable content warnings
  • Content version cleanup policy
  • Enable cleanup
  • Keep all versions newer than days
  • Keep latest version per day for days
  • Imaging
  • Image file types
  • Auto fill image properties
  • Custom media document
  • Notifications
Edit on GitHub
Export as PDF
  1. Reference
  2. Configuration

Content Settings

Information on the content settings section

Content settings contains a handful of settings related to the content in the CMS. It includes settings such as allowed upload files, image settings, and much more. All the values in the content settings has default values, so all configuration is optional.

The following snippet will give an overview of the keys and values in the content section including the default values:

"Umbraco": {
  "CMS": {
    "Content": {
      "ContentVersionCleanupPolicy": {
        "EnableCleanup": false,
        "KeepAllVersionsNewerThanDays": 7,
        "KeepLatestVersionPerDayForDays": 90
      },
      "AllowEditInvariantFromNonDefault": true,
      "AllowedMediaHosts":  [],
      "AllowedUploadedFileExtensions": [],
      "DisableDeleteWhenReferenced": false,
      "DisableUnpublishWhenReferenced": false,
      "DisallowedUploadedFileExtensions": ["ashx", "aspx", "ascx", "config", "cshtml", "vbhtml", "asmx", "air", "axd", "xamlx"],
      "Error404Collection": [],
      "HideBackOfficeLogo": false,
      "Imaging": {
        "ImageFileTypes": ["jpeg", "jpg", "gif", "bmp", "png", "tiff", "tif"],
        "AutoFillImageProperties": [
          {
            "Alias": "umbracoFile",
            "ExtensionFieldAlias": "umbracoExtension",
            "HeightFieldAlias": "umbracoHeight",
            "LengthFieldAlias": "umbracoBytes",
            "WidthFieldAlias": "umbracoWidth"
          }
        ]
      },
      "LoginBackgroundImage": "assets/img/login.jpg",
      "LoginLogoImage": "assets/img/application/umbraco_logo_white.svg",
      "MacroErrors": "Inline",
      "Notifications": {
        "DisableHtmlEmail": false,
        "Email": null
      },
      "PreviewBadge": "<![CDATA[<b>My HTML here</b>]]>",
      "ResolveUrlsFromTextString": false,
      "ShowDeprecatedPropertyEditors": false,
      "ShowDomainWarnings": true,
      "ShowUnroutableContentWarnings": true
    }
  }
}

Root level settings

In the root level section, that is those without a separate sub section like Imaging, you can configure:

Allow edit invariant from non-default

Invariant properties are properties on a multilingual site that are not varied by culture. This means that they share the same value across all languages added to the website.

When the setting is set to false the invariant properties that are shared between all languages can only be edited from the default language. This means you need access to the default language, in order to edit the property.

When set to true (default) the invariant properties will need to be unlocked before they can be edited. The lock exists in order to make it clear that this change will affect more languages.

Allowed upload file extensions

If greater control is required than available from the DisallowedUploadedFileExtensions setting, this setting can be used to store a list of file extensions. If provided, only files with these extensions can be uploaded via the backoffice.

Allowed media hosts

By default, only relative URLs are allowed when getting URLs for resized images or thumbnails using the ImagesController. If you need absolute URLs you will have to add the allowed hosts to this list. The value could be ["umbraco.com", "www.umbraco.com", "our.umbraco.com"].

Disable delete when referenced

This setting allows you to specify whether a user can delete content or media items that depend on other items. This also includes any descendants that have dependencies. Setting this to true will remove or disable the Delete button.

Disable unpublish when referenced

This setting allows you to specify whether or not users can unpublish content items that depend on other items or have descendants that have dependencies. Setting this to true will disable the Unpublish button.

Disallowed upload files

This setting consists of a list of file extensions that editors shouldn't be allowed to upload via the backoffice.

Error 404 collection

In case of a 404 error (page not found) Umbraco can return a default page instead. This is set here. Notice you can also set a different error page, based on the current culture so a 404 page can be returned in the correct language.

"Error404Collection": [
  {
    "ContentId": 1,
    "Culture": "en-US"
  }
]

The above example shows what you need to do if you only have a single site that needs to show a custom 404 page. You specify which node that should be shown when a request for a non-existing page is being made. You can specify the node in three ways:

  1. Enter the nodes id ("ContentId": 1)

  2. Enter the node's GUID ("ContentKey": "4f96ffdd-b969-46a8-949e-7935c41fabc0")

  3. Enter the XPath to find the node ("ContentXPath": "/root/Home//TextPage[@urlName = 'error404'")

  • Ids are usually local to the specific solution (so won't point to the same node in two different environments if you're using Umbraco Cloud).

  • GUIDs are universal and will point to the same node on different environments, provided the content was created in one environment and deployed to the other(s).

  • When using XPath, there is no "context" (like, you can't find the node based on "currentPage") so needs to be a global absolute path.

If you have multiple sites, with different cultures, setup in your tree then you will need to setup the errors section like below:

"Error404Collection": [
  {
    "ContentId": 1,
    "Culture": "default"
  },
  {
    "ContentId": 200,
    "Culture": "en-US"
  }]

If you have more than two sites and forget to add a 404 page and a culture, the default page will act as fallback. Same happens if you for some reason forget to define a hostname on a site.

Hide backoffice logo

This setting can be used to hide the Umbraco logo in backoffice.

Login background image

You can specify your own background image for the login screen here. The image will automatically get an overlay to match backoffice colors. This path is relative to the wwwroot/umbraco path. The default location is: wwwroot/umbraco/assets/img/installer.jpg.

Login logo image

You can specify your own image for the small logo in the top left corner of the login screen. This path is relative to the wwwroot/umbraco path. The default location is: wwwroot/umbraco/assets/img/application/umbraco_logo_white.svg.

Macro errors

This setting allows you to specify how errors in macros should be handled.

Options:

  • Inline - Default Umbraco behavior, show an inline error within the macro but allow the page to continue rendering.

  • Silent - Silently suppress the error and do not display the offending macro.

  • Throw - Throw an exception.

  • Content - Silently suppress the error, and display custom content reported in the error event args.

Preview badge

This allows you to customize the preview badge being shown when you're previewing a node.

"PreviewBadge": "<![CDATA[<a id=\"umbracoPreviewBadge\" style=\"position: absolute; top: 0; right: 0; border: 0; width: 149px; height: 149px; background: url('{1}/preview/previewModeBadge.png') no-repeat;\" href=\"{0}/endPreview.aspx?redir={2}\"><span style=\"display:none;\">In Preview Mode - click to end</span></a>]]>"

Resolve urls from text string

This setting is used when you're running Umbraco in virtual directories. Setting this to true can increase render time for pages with a large number of links. However, this is required if Umbraco is running in a virtual directory.

Show deprecated property editors

This setting is used for controlling whether or not the Data Types marked as obsolete should be visible in the dropdown when creating new Data Types.

By default this is set to false. To make the obsolete data types visible in the dropdown change the value to true.

Show domain warnings

If you do not configure Domains for each language in a multilingual site then every time you publish your content you get this warning:

Content published: Domains are not configured for multilingual site, please contact an administrator, see log for more information.

If you have a use case for not setting the domains, you can set this setting ShowDomainWarnings to false to stop the warning from displaying.

Show unroutable content warnings

If your routing setup leads to more than one document having the same URL, on publish a warning will be displayed:

Content published: The document does not have a URL, possibly due to a naming collision with another document. More details can be found under Info.

To suppress these warnings, set this option to false.

Content version cleanup policy

The global settings for the scheduled job which cleans historic content versions. These settings can be overridden per Document Type.

Current draft and published versions will never be removed, nor will individual content versions which have been marked as "preventCleanup".

"ContentVersionCleanupPolicy": {
  "EnableCleanup": false,
  "KeepAllVersionsNewerThanDays": 7,
  "KeepLatestVersionPerDayForDays": 90
}

To retain only the current draft and published version, set both the "keep" settings values to 0. The next time the scheduled job runs (hourly) all non-current versions (except those marked "prevent cleanup") will be removed.

Enable cleanup

When set to true, a scheduled job will delete historic content versions that are not retained according to the policy every hour.

When set to false, the scheduled job will not delete any content versions, regardless of any overridden settings for a Document Type.

The dotnet new template provides an appsettings.json file with the default value set to true for all sites.

Keep all versions newer than days

All versions that fall in this period will be kept.

Keep latest version per day for days

For content versions that fall in this period, the most recent version for each day is kept. All previous versions for that day are removed unless marked as preventCleanup.

This variable is independent of KeepAllVersionsNewerThanDays, if both were set to the same value KeepLatestVersionPerDayForDays would never apply as KeepAllVersionsNewerThanDays is considered first.

Imaging

This section is used for managing how Umbraco handles images, allowed attributes and, which properties of an image that should be automatically updated on upload.

"Imaging": {
  "ImageFileTypes": ["jpeg", "jpg", "gif", "bmp", "png", "tiff", "tif"],
  "AutoFillImageProperties": {
    "Alias": "umbracoFile",
    "WidthFieldAlias": "umbracoWidth",
    "HeightFieldAlias": "umbracoHeight",
    "LengthFieldAlias": "umbracoBytes",
    "ExtensionFieldAlias": "umbracoExtension"
  }
}

Let's break it down.

Image file types

This is a separated list of accepted image formats

Auto fill image properties

You can define what properties should be automatically updated when an image is being uploaded. This means that if you decide to rename the default umbracoWidth and umbracoHeight properties the values in "WidthFieldAlias" and "HeightFieldAlias" need to be updated. This needs to happen in order to automatically populate the values when the image is being uploaded.

Custom media document

If you need to create a custom Media Type to handle images you need to add another object using the custom Media Type alias. Like below. Keep in mind that the width and height attributes have also been changed in this example.

"Imaging": {
  "ImageFileTypes": ["jpeg", "jpg", "gif", "bmp", "png", "tiff", "tif"],
  "AutoFillImageProperties": [
    {
      "Alias": "umbracoFile",
      "WidthFieldAlias": "umbracoWidth",
      "HeightFieldAlias": "umbracoHeight",
      "LengthFieldAlias": "umbracoBytes",
      "ExtensionFieldAlias": "umbracoExtension"
    },
    {
      "Alias": "customImage",
      "WidthFieldAlias": "width",
      "HeightFieldAlias": "height",
      "LengthFieldAlias": "umbracoBytes",
      "ExtensionFieldAlias": "umbracoExtension"
    }
  ]
}

Notifications

PreviousContent Dashboard SettingsNextData Types Settings

Last updated 29 days ago

The current implementation of XPath is suboptimal, marked as obsolete, and scheduled for removal in Umbraco 14. The replacement for ContentXPath is .

See for more details on overriding configuration and preventing cleanup of specific versions.

Umbraco can send out email notifications, set the sender email address for the notifications emails here. To set the SMTP server used to send the emails, edit the standard Simple Mail Transfer Protocol (SMTP) section in the global section, see for more information.

Content Version Cleanup
global settings
IContentLastChanceFinder