How to Set Up SSL and PCI Compliance Basics for an Online Store

Handling payment card data comes with real compliance obligations. This guide covers the technical SSL/TLS foundation and general PCI DSS awareness relevant to running an online store on a VPS — not a substitute for formal compliance consultation.

Important Disclaimer

This article covers general technical practices, not formal legal or compliance advice. PCI DSS compliance requirements depend on your specific payment processing setup and transaction volume — consult your payment processor and, where appropriate, a qualified compliance professional for your specific obligations.

The Simplest Path: Avoid Handling Card Data Directly

Using a hosted payment page or client-side tokenization (where your payment processor's own JavaScript collects card details, never touching your server) dramatically reduces your compliance scope compared to directly processing raw card numbers on your own infrastructure — most modern payment gateways (Stripe, PayPal, and others) support this pattern.

Step 1 — Enforce HTTPS Everywhere, No Exceptions

sudo certbot --nginx -d yourdomain.com -d www.yourdomain.com

See HTTP to HTTPS Redirect: Forcing SSL on Nginx & Apache to ensure absolutely no page (not just checkout) is reachable over plain HTTP.

Step 2 — Use Modern TLS Only

See TLS 1.2 vs TLS 1.3: Understanding and Configuring Modern TLS on Nginx & Apache — disable legacy TLS/SSL versions entirely, a standard PCI requirement.

Step 3 — Add HSTS

add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;

Prevents any accidental downgrade to HTTP for repeat visitors.

Step 4 — Never Log or Store Full Card Numbers

If using a tokenization-based payment flow (recommended), your application should never see or need to store raw card numbers at all — audit your logging configuration to ensure no card data accidentally ends up in application or web server logs.

Step 5 — Keep the Platform and Plugins/Extensions Updated

Outdated e-commerce software and extensions are a common source of security vulnerabilities in payment-handling applications — apply updates promptly, especially anything flagged as security-relevant.

Step 6 — Restrict Admin Panel Access

location /admin {
    allow YOUR_TRUSTED_IP;
    deny all;
}

Limiting admin access reduces the attack surface for the part of your store with the most sensitive access.

Step 7 — Implement a Web Application Firewall

See How to Set Up ModSecurity Web Application Firewall for Nginx/Apache — an additional layer of protection against common web application attacks targeting e-commerce platforms specifically.

Step 8 — Regular Security Scanning

Periodic vulnerability scanning of your store (many payment processors require this for certain compliance levels) helps catch issues before they're exploited — consult your payment processor about specific scanning requirements applicable to your setup.

Understanding PCI DSS Compliance Levels

Compliance requirements scale with transaction volume — smaller merchants typically complete a simpler self-assessment questionnaire, while larger volumes require more extensive validation. Your payment processor can clarify which level applies to your specific business.

Common Errors

Mixed content warnings on the checkout page — verify all resources (images, scripts) load over HTTPS, not HTTP, even on third-party embedded payment widgets.

Continue Reading

Browse more articles in E-commerce Platform Deployment.

  • pci compliance, ecommerce ssl, payment security, pci dss basics
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

How to Deploy WooCommerce on a VPS (Complete Guide)

WooCommerce turns WordPress into a full e-commerce platform — the most widely used option...

How to Install Magento Open Source on a VPS

Magento Open Source (formerly Magento Community Edition) is a powerful, highly customizable...

How to Install PrestaShop on a VPS

PrestaShop is an open-source e-commerce platform offering a good balance between feature depth...

How to Install OpenCart on a VPS

OpenCart is a lightweight, straightforward open-source e-commerce platform — a good fit for...

How to Optimize a VPS for High-Traffic E-commerce

E-commerce stores face unique performance challenges — dynamic cart/checkout pages that...