Join our Newsletter — 33% off our NHI Course
Home› FAQ› Architecture & Implementation› How do you enforce HTTPS-only access for Azure…
Architecture & Implementation

How do you enforce HTTPS-only access for Azure Function Apps and web apps?

← Back to all FAQ
By NHI Mgmt Group Editorial Team Updated October 20, 2026 Domain: Architecture & Implementation

Set the app to require HTTPS so requests over plain HTTP are redirected or rejected. Check any dependent integrations, custom domains, and authentication flows after enabling the setting, because some clients may need updates. Also confirm that certificates are valid and that no alternate endpoint bypasses the HTTPS requirement.

How HTTPS enforcement works in Azure App Service and Function Apps

In Azure App Service, requiring HTTPS changes the public endpoint behavior rather than the application code. Once enabled, the platform forces browser and client traffic away from plain HTTP, which reduces accidental downgrade risk and makes the service’s transport posture consistent. For Function Apps and web apps, this is usually the baseline setting to verify before you trust custom domains, redirects, or upstream integrations.

The control is most effective when you treat it as an endpoint policy, not a complete security boundary. You still need the app, its authentication flows, and any reverse proxies or front doors in front of it to behave consistently, because a secure front end can still be undermined by an alternate path that accepts HTTP or rewrites requests unexpectedly.

For Azure environments, this fits naturally with broader platform hardening such as Microsoft Azure Security Guide and the surrounding App Service configuration model. It is also part of the same operational discipline you use for other platform settings that affect exposure, routing, and identity-aware access decisions.

What to check after you turn on HTTPS-only

After enabling HTTPS-only, validate the application as a user, not just as an administrator. Confirm that the default hostname, every custom domain, and every external callback or redirect still works over HTTPS and that no integration is still hard-coded to HTTP. If a client, webhook, or automation breaks, the issue is often in the dependency rather than the setting itself.

Also verify the certificate chain and renewal state for any custom domain. A valid HTTPS setting is only useful if the presented certificate is trusted and current, especially where users, API clients, or identity providers enforce certificate checks strictly. If the app is part of a federated login flow, make sure the redirect URI, sign-in endpoint, and post-authentication landing page all continue to resolve without fallback to HTTP.

This is where a broader view of app behavior helps. A web-facing workload still needs its access paths reviewed for bypasses, including shared origin names, slot URLs, diagnostics endpoints, and any legacy hostname that may still be reachable. NHIMG’s Web Application Security Testing Guide is useful when you want to validate the actual request paths rather than assume the front-door setting covers everything.

Why HTTPS-only can still fail in practice

HTTP enforcement mainly fails when another control plane or dependency leaves a second path open. That can include an upstream load balancer, an application gateway, a stale custom DNS record, or a legacy endpoint that still answers on port 80. In those cases, the app may appear protected while a less obvious route still accepts unencrypted traffic.

Another common failure mode is partial integration. One service may follow redirects correctly while another silently rejects them, caches an old endpoint, or sends tokens to the wrong scheme. That matters because authentication flows, session cookies, and callback handling are often the first place where an HTTP to HTTPS transition exposes compatibility problems or accidental exposure. If the app is part of a larger platform, review the surrounding Azure security posture with Serverless Security Guide so the function runtime, event path, and secret handling are aligned with the transport setting.

Risk and Threat Considerations

Leaving HTTP available creates exposure for session theft, traffic interception, and downgrade abuse, especially when users arrive through bookmarks, old links, or third-party integrations that do not enforce secure transport consistently. In a cloud app, the practical risk is often not the browser landing page but the forgotten alternate route that still accepts requests.

Failure mechanism: A hidden or legacy endpoint, proxy rule, or integration path continues to serve HTTP, allowing traffic or tokens to traverse an unencrypted channel even after the main app is set to HTTPS-only.

Impact: Attackers or passive observers can exploit the weaker path to capture credentials, cookies, or sensitive request data, or to keep a compromised integration working through an insecure fallback.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

CSA Cloud Controls Matrix, NIST SP 800-53 Rev 5 and CIS Controls v8 set the technical controls, while ISO/IEC 27001:2022 defines the regulatory obligations.

FrameworkControl / ReferenceRelevance
CSA Cloud Controls MatrixIAM — Identity & Access ManagementHTTPS-only protects access paths to cloud apps and their authentication flows.
Recommendation — Enforce secure transport on app access paths and verify all auth flows use it.
NIST SP 800-53 Rev 5SC-8 — Transmission Confidentiality and IntegrityHTTPS addresses confidentiality and integrity of data in transit for web and function endpoints.
SC-23 — Session AuthenticityHTTPS underpins trustworthy browser sessions and redirect-based authentication flows.
Recommendation — Require protected transmission for all externally reachable application endpoints. Validate that session and redirect handling only operate over authenticated transport.
ISO/IEC 27001:2022A.8.24 — Use of cryptographyHTTPS relies on certificates and TLS to protect data in transit.
Recommendation — Manage TLS certificates and enforce encrypted transport for public app access.
CIS Controls v8CIS-12 — Network Infrastructure ManagementHTTPS-only is a secure network exposure setting for internet-facing workloads.
Recommendation — Harden exposed services so only the intended secure protocol remains reachable.

Practitioner Guidance

What to verify: Confirm every exposed hostname, redirect target, and callback endpoint resolves over HTTPS only, including staging slots and custom domains. If any path still responds on port 80, treat it as an exception that needs closure or explicit justification.

Common mistake: Teams often enable the setting in Azure and stop there. The better test is whether a user, API client, or identity flow can still reach the app through some other route that the platform setting does not govern.

Practitioner takeaway: HTTPS-only is a necessary baseline, but it is only reliable when you validate the full request path, certificate state, and dependent integrations as one delivery chain.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

NHIMG Editorial Note
Reviewed and updated by the NHIMG editorial team on October 20, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org