diff --git a/src/Umbraco.Infrastructure/HostedServices/KeepAlive.cs b/src/Umbraco.Infrastructure/HostedServices/KeepAlive.cs
index 40c250f86e..644b2c278f 100644
--- a/src/Umbraco.Infrastructure/HostedServices/KeepAlive.cs
+++ b/src/Umbraco.Infrastructure/HostedServices/KeepAlive.cs
@@ -33,7 +33,7 @@ namespace Umbraco.Cms.Infrastructure.HostedServices
///
/// Initializes a new instance of the class.
///
- /// Accessor for the current request.
+ /// The current hosting environment
/// Representation of the main application domain.
/// The configuration for keep alive settings.
/// The typed logger.
@@ -86,7 +86,7 @@ namespace Umbraco.Cms.Infrastructure.HostedServices
using (_profilingLogger.DebugDuration("Keep alive executing", "Keep alive complete"))
{
- var umbracoAppUrl = _hostingEnvironment.ApplicationMainUrl.ToString();
+ var umbracoAppUrl = _hostingEnvironment.ApplicationMainUrl?.ToString();
if (umbracoAppUrl.IsNullOrWhiteSpace())
{
_logger.LogWarning("No umbracoApplicationUrl for service (yet), skip.");