Skip to main content
Back to blog
April 28, 2026·Updated April 28, 2026|8 min read|Antoine Duno

Healthcare Website Security Guide: HIPAA, TLS, and Patient Data Protection

Healthcare websites face a unique combination of regulatory requirements and high-value data targets. This guide covers the technical security controls required under HIPAA and how to verify them.

ZeriFlow Team

1,682 words

Healthcare Website Security Guide: HIPAA, TLS, and Patient Data Protection

Healthcare website security operates under stricter requirements than almost any other sector. A misconfigured TLS setting or an insecure cookie on a patient portal is not just a technical vulnerability — it is a potential HIPAA violation carrying fines from $100 to $50,000 per incident. This guide covers the technical controls that matter most for medical websites and patient-facing applications.

Scan your site in 60 seconds — it's free: ZeriFlow →

HIPAA Technical Safeguards: What They Actually Require

The HIPAA Security Rule's Technical Safeguards (45 CFR §164.312) are often described in vague terms. Here is what they translate to in practical web security:

Access Control (§164.312(a)(1)) Every system accessing ePHI (electronic Protected Health Information) must have unique user identification and automatic logoff. For patient portals: no shared accounts, session timeouts after inactivity (typically 15–30 minutes for clinical applications), and MFA for staff accessing patient records.

Audit Controls (§164.312(b)) Hardware, software, and procedural mechanisms to record and examine activity in systems containing ePHI. In web application terms: structured logging of authentication events, data access, record modifications, and export events. Logs must be tamper-evident and retained for 6 years.

Integrity (§164.312(c)(1)) ePHI must not be improperly altered or destroyed. For web applications: input validation, database integrity constraints, and checksums on sensitive records. Also relevant: protection against malicious content injection (XSS attacks that could alter displayed patient data).

Transmission Security (§164.312(e)(1)) ePHI transmitted over open networks must be protected against unauthorized access. This is the TLS requirement. Any patient data transmitted over the internet — including API calls from mobile apps to your backend — requires encryption in transit.


TLS Configuration for Medical Websites

TLS configuration for healthcare sites must meet a higher standard than a typical marketing website. The HHS guidance on HIPAA and cloud computing explicitly references encryption as a standard safeguard.

Required configuration: - TLS 1.2 minimum, TLS 1.3 strongly preferred - Disable SSL 3.0, TLS 1.0, TLS 1.1 — these are explicitly insecure - Strong cipher suites only: AES-128-GCM, AES-256-GCM, ChaCha20-Poly1305 - Disable RC4, DES, 3DES, export-grade ciphers - Forward secrecy via ECDHE key exchange — ensures past sessions cannot be decrypted if the private key is later compromised - Certificate validity monitoring — expired certificates on a patient portal are both a HIPAA risk and a patient safety issue

HSTS for healthcare sites:

Strict-Transport-Security: max-age=63072000; includeSubDomains; preload

A two-year max-age with subdomain inclusion and preload list submission eliminates any possibility of a patient accessing your site over HTTP, even on first visit. For patient portals and appointment booking systems, this is essential.

Running a ZeriFlow scan on any healthcare site gives an instant view of TLS version support, cipher suite strength, certificate validity, and HSTS configuration — the technical evidence you need for compliance documentation.


Secure Cookies for Patient Portal Sessions

Patient portal sessions represent some of the most sensitive data a web application handles. Cookie misconfiguration is one of the most common and most preventable security failures in healthcare web applications.

Every session cookie on a healthcare site must have:

Set-Cookie: session_id=abc123; 
  Secure; 
  HttpOnly; 
  SameSite=Strict; 
  Path=/; 
  Max-Age=1800

Breaking down why each flag matters in a healthcare context:

  • Secure — cookie only transmitted over HTTPS. Without this, a patient on a hotel Wi-Fi can have their session token intercepted in plaintext.
  • HttpOnly — JavaScript cannot access this cookie. Prevents XSS attacks from stealing session tokens. Critical for patient portals where an XSS vulnerability could expose medical records.
  • SameSite=Strict — cookie not sent with cross-site requests. Prevents cross-site request forgery attacks. For appointment booking and form submissions, this is a meaningful protection.
  • Max-Age=1800 — 30-minute session lifetime. Aligns with typical HIPAA-compliant session timeout requirements for clinical applications.

For cookie consent banners (required for GDPR in EU-facing healthcare sites), analytics and marketing cookies must be opt-in and must not be set before user consent. Conflating session security cookies with analytics consent cookies is a common implementation mistake.


DMARC and Email Security for Medical Organizations

Email is the number one vector for healthcare phishing attacks. In 2025, healthcare remained the most-targeted sector for email-based attacks, largely because impersonating a healthcare provider or insurer is highly effective for credential harvesting and wire fraud.

The technical controls that matter:

SPF (Sender Policy Framework) Publishes which IP addresses are authorized to send email from your domain:

v=spf1 include:_spf.google.com include:mailgun.org ~all

The ~all (softfail) is appropriate during initial rollout; move to -all (hardfail) once all legitimate senders are accounted for.

DKIM (DomainKeys Identified Mail) Cryptographically signs outbound email. A DKIM signature that validates against your public DNS record proves the email was not tampered with in transit and came from an authorized sender.

DMARC (Domain-based Message Authentication) Ties SPF and DKIM together and tells receiving mail servers what to do with messages that fail:

v=DMARC1; p=quarantine; rua=mailto:dmarc-reports@yourhospital.org; ruf=mailto:dmarc-forensic@yourhospital.org; sp=quarantine; adkim=s; aspf=s; pct=100

For healthcare organizations: - Start at p=none (monitor only) for the first 4–6 weeks — use the aggregate reports (rua) to identify all legitimate sending sources - Move to p=quarantine once you have confidence in your SPF and DKIM coverage - Move to p=reject for maximum protection — unauthenticated emails claiming to be from your domain are rejected at receiving servers

A p=reject DMARC policy on a hospital domain means that phishing emails pretending to come from noreply@yourhospital.org are rejected before they reach patients' inboxes.


Audit Trails and Logging for HIPAA Compliance

HIPAA requires audit controls — the ability to record and examine access to ePHI. For web applications, this means:

What to log: - Authentication events: login, logout, failed attempts (with IP, user agent, timestamp) - ePHI access: which records were viewed, by whom, when - ePHI modification: what changed, previous value, new value, who changed it - ePHI export: any download, print, or external transmission - Administrative actions: user creation, permission changes, configuration changes - System events: errors that may indicate attempted attacks

How to store logs securely: - Separate log storage from application storage — a compromised application server should not be able to delete its own audit trail - Immutable log storage: write-once S3 bucket policies, or a dedicated SIEM - 6-year retention minimum under HIPAA - Log encryption at rest - Access controls on log data — logs contain ePHI (patient IDs, timestamps of visits) and must be protected accordingly

Logging ≠ monitoring: Logs are only useful if someone reviews them. Set up alerting for suspicious patterns: multiple failed logins, bulk record exports, after-hours access to sensitive records, access from unusual geographies.


Pre-Launch Security Checklist for Healthcare Sites

Before going live with any patient-facing application:

  • [ ] TLS 1.3 enabled, TLS 1.0/1.1 disabled — verify with automated scan
  • [ ] HSTS with 2-year max-age, includeSubDomains, preload
  • [ ] All session cookies: Secure + HttpOnly + SameSite=Strict
  • [ ] Content-Security-Policy configured and tested
  • [ ] SPF record published and validated
  • [ ] DKIM configured for all outbound mail streams
  • [ ] DMARC at minimum p=quarantine
  • [ ] Session timeout at 15–30 minutes for clinical access
  • [ ] MFA enforced for all staff accounts
  • [ ] Audit logging active and verified
  • [ ] BAA (Business Associate Agreement) signed with all third-party vendors handling ePHI
  • [ ] Penetration test completed and criticals remediated

FAQ

Q: Does HIPAA apply to my medical practice's website even if it's just informational?

A: If the website does not collect, store, or transmit ePHI — no appointment scheduling, no patient portal, no contact forms that reference medical conditions — it is likely not subject to the HIPAA Security Rule. However, the HIPAA Privacy Rule still applies to the organization, and basic security hygiene (HTTPS, security headers) is best practice regardless. The moment you add a contact form asking about "reason for visit" or an appointment booking system, you have ePHI and the Security Rule applies.

Q: What is the minimum TLS version required under HIPAA?

A: HIPAA does not specify a version number — it requires "encryption of ePHI in transit" as a specification. However, HHS guidance and industry consensus (NIST SP 800-52 Rev 2) establish TLS 1.2 as the minimum and TLS 1.3 as preferred. Auditors and cyber liability insurers use TLS 1.2+ as a baseline expectation.

Q: How long must audit logs be retained under HIPAA?

A: HIPAA requires documentation retention for 6 years from the date of creation or the date when it was last in effect. Apply this to audit logs as a conservative baseline.

Q: Can I use Google Analytics on a healthcare website without a BAA?

A: Not safely. Google Analytics collects IP addresses and can be used to identify users. If those users are patients and the analytics data is associated with health-related pages, it constitutes ePHI. Google offers a BAA as part of Google Workspace and Google Cloud, but standard Google Analytics does not come with a BAA. Use a HIPAA-compliant analytics alternative (Matomo self-hosted, or a vendor that offers a BAA) for patient-facing sites.

Q: What HIPAA fine risk does a misconfigured security header carry?

A: Directly, a missing header is not a HIPAA violation on its own. But if a missing Content-Security-Policy enables an XSS attack that exposes patient records, the resulting breach carries fines at the "reasonable cause" level — $1,000 to $100,000 per violation category, capped at $1.9 million per year. The cost of configuring headers correctly is measured in minutes. The cost of not doing so can be existential.


Conclusion

Healthcare website security is not more complicated than general web security — it just has higher stakes and explicit regulatory requirements. The technical controls are the same: TLS 1.3, HSTS, secure cookie flags, security headers, DMARC. The difference is the documentation, the BAA management, and the audit trail requirements.

Start with a baseline technical audit to understand where you stand today. ZeriFlow covers the configuration layer — TLS, headers, cookies, DNS, and email security — in a single 60-second scan that gives you a documented starting point.

Start your free ZeriFlow scan → — no credit card, instant results.

Ready to check your site?

Run a free security scan in 30 seconds.

Related articles

Keep reading