Skip to content
FunnelGuard

Fix guide by FunnelsGuard

Payment iframe on an insecure page: how to find and fix it

OPS-368High impactDetectedBy FunnelGuardPublished Updated
On this page

What this issue is

Most payment providers show their card form inside an iframe, a small window of the provider's page embedded in yours. The provider's frame is secure. The problem is the page around it. If that page is served over plain http://, or its certificate is invalid or expired, the setup is insecure.

A related case is mixed content: the page loads over HTTPS, but some of its images, scripts or frames are requested over http://. Browsers block the risky kinds of mixed content, and that can include the payment frame or scripts that control it. PCI-DSS, the card industry security standard, expects payment pages to be served over strong encryption.

Why it costs you leads or sales

Buyers see a Not secure label in the address bar or a blank space where the card form should be. Many will not type card details into that page. If the browser blocks the frame, nobody can pay at all, and you only notice when orders dry up.

Where an insecure page stops a sale
  1. Product pageLoads normally
  2. Checkout pageServed over HTTP or mixed content
  3. Payment iframeBlocked or flagged Not secure
  4. Order confirmedNever reached

The checkout page loads, but the payment frame is blocked, so every later step is lost.

Checkout completions before and after the fixExample numbers
Checkout completions before and after the fix (example)Frame blocked: 4 orders per week; After fix: 38 orders per week01529438Frame blockedAfter fixorders per week

Example: illustrative numbers for a store whose payment frame was blocked by mixed content.

How to check if your site has it

Check your checkout for insecure content
  1. Open the checkout in a private window

    Add an item to the cart and go to the payment step. Look at the address bar. It should show a padlock and start with https://.

  2. Try the HTTP address

    Type your checkout URL starting with http://. It should redirect to https:// straight away.

  3. Open the browser console

    Press F12 and open Console. Look for messages such as Mixed Content: The page was loaded over HTTPS, but requested an insecure resource.

  4. Check the Network tab

    Reload the page and filter for http:// requests. Note every file that is not HTTPS.

  5. Check the certificate

    Click the padlock, open the certificate details and confirm it is valid, not expired and covers the exact domain, including www if used.

How to fix it

The fix has two parts: make sure the whole site is served over HTTPS with a valid certificate, then replace any hard-coded http:// links. The exact menus depend on your platform and theme.

Force HTTPS by platform
  1. Set HTTPS addresses

    In Settings > General, change WordPress Address and Site Address to https://.

  2. Fix old http:// links

    Use a search-and-replace tool on the database to change http://yourdomain to https://yourdomain. Take a backup first.

  3. Check plugins and theme

    Look for hard-coded http:// files in theme settings and payment plugin settings.

Nginx: redirect all HTTP to HTTPSnginx
server {
  listen 80;
  server_name example.com www.example.com;
  return 301 https://$host$request_uri;
}
Apache .htaccess: redirect HTTP to HTTPShtaccess
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [L,R=301]
Optional: upgrade stray insecure requestshtml
<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
Checkout page before and after

Insecure

  • Page reachable over http://
  • Console shows mixed content errors
  • Payment frame blank or flagged Not secure

Secure

  • HTTP redirects to HTTPS
  • No mixed content messages
  • Payment frame loads with a padlock

How to confirm it's fixed

Confirmation checks
  • The checkout URL shows a padlock and starts with https://
  • The http:// version redirects to https:// with a 301
  • The browser console shows no Mixed Content messages
  • The certificate is valid and covers your domain and www
  • The payment iframe loads and accepts input
  • A test order in your payment provider's test mode completes

How to prevent it happening again

Most cases come back through certificate expiry, a new plugin or an editor pasting an http:// link into a page. Turn on automatic certificate renewal, check the checkout after every theme, plugin or tag change, and keep payment pages free of unneeded third-party code.

How it usually unfolds
  1. Day 1

    A new banner or script is added with an http:// address.

  2. Day 1

    Browsers block it and flag the checkout page.

  3. Day 3

    Orders slow down and nobody knows why.

  4. Day 5

    Someone spots the console warning and fixes the URL.

How FunnelGuard handles this

FunnelGuard detects this. Its robot visitor runs your real checkout journey on a schedule and checks for mixed content and SSL problems on the pages it visits. If a check fails, it is re-checked from a second region before one alert goes out by email, Slack, Teams, WhatsApp, webhook or PagerDuty, with a screenshot and a likely cause.

The robot stops before payment unless your store's test mode is set up, and it never enters real card details. The free plan covers 1 site and 2 journeys with daily checks and no card needed. A free read-only website audit is also available.

Questions people ask

Why is my payment iframe not loading on my checkout page?

A common cause is mixed content: your page is HTTPS but something it needs loads over HTTP, or the page itself is HTTP. Open the browser console (F12) and look for Mixed Content errors, then fix the URLs they name. Also check that your certificate is valid.

What is mixed content on a checkout page?

Mixed content is an HTTPS page that loads some files, such as scripts, images or frames, over HTTP. Browsers block the riskier types and warn about the rest. On a checkout this can break the payment form.

How do I fix a Not secure warning on my checkout?

Install a valid SSL certificate, redirect all HTTP URLs to HTTPS and replace any http:// links in your theme, plugins and embedded code. Then reload the page and check the console for remaining warnings.

Does a payment iframe make my site PCI compliant?

No. A hosted iframe from your provider reduces how much card data touches your server, but you still must serve the surrounding page securely and meet the PCI-DSS requirements that apply to your setup. Check with your payment provider or assessor.

Will upgrade-insecure-requests fix mixed content?

It can, as a stopgap. It tells the browser to request http:// resources over HTTPS, which only works if those files are available on HTTPS. Fixing the URLs at the source is the safer fix.

How do I test my checkout without placing a real order?

Use your payment provider's test mode with its test card numbers, or check the page up to the payment step. FunnelGuard stops before payment unless test mode is set up.

Can FunnelGuard tell me when my checkout has mixed content?

Yes. It checks for mixed content and SSL problems as it runs your checkout journey on a schedule, and sends one alert with a screenshot and a likely cause after a second-region re-check.

Does FunnelGuard catch this?

Detected

FunnelGuard checks for this today.

How: Mixed content / SSL.

Stop finding out from your customers

FunnelGuard runs your real forms and checkouts on a schedule, checks the tracking and the leads behind them, and alerts you once, with a screenshot. Try any paid plan free for 3 days.