Brazil's biggest MU Online portal — since 2003
Tutorial Intermediate Infrastructure

How to fix an invalid SSL certificate error on your MU Online server's site and launcher

Diagnose and fix invalid, expired, or misconfigured SSL/TLS certificate errors on your MU Online server's site, account panel, and API, including renewal via Let's Encrypt and correct configuration in Nginx/Apache.

BR Bruno · Updated on Sep 20, 2024 · ⏱ 14 min read
Quick answer

An invalid SSL/TLS certificate error is one of the most visible (and most damaging to reputation) infrastructure problems an MU Online private server can face: the player opens the site to create an account or access the panel and gets a red "connection is not private" or "site not secure" warning.

An invalid SSL/TLS certificate error is one of the most visible (and most damaging to reputation) infrastructure problems an MU Online private server can face: the player opens the site to create an account or access the panel and gets a red "connection is not private" or "site not secure" warning. Besides scaring off new players, this can completely block registration in more restrictive browsers. This tutorial covers diagnosing the exact cause of the error, fixing it via certificate renewal/reissuance, and correctly configuring Nginx and Apache so it doesn't happen again.

How SSL/TLS works in practice on your server

When a player accesses https://yoursite.com, the browser expects to receive a valid digital certificate, issued by a recognized Certificate Authority (CA), that proves the domain is genuinely controlled by whoever it claims to be. The certificate has three elements that trigger an error if incorrect: validity (within the expiration period), domain (matching exactly what's being accessed, including www or not), and chain of trust (the CA's intermediate certificate is correctly installed on the server).

Diagnosing the exact type of error

Before blindly renewing a certificate, identify the exact message — each one points to a different cause:

Browser messageMost likely cause
"NET::ERR_CERT_DATE_INVALID"Expired certificate
"NET::ERR_CERT_COMMON_NAME_INVALID"Certificate issued for a different domain (e.g., missing www, or wrong domain)
"NET::ERR_CERT_AUTHORITY_INVALID"Intermediate certificate chain not installed / self-signed certificate
"Your connection isn't fully secure" (mixed content)An HTTPS page loading resources (images, scripts) over HTTP
Error only in the launcher, site normalAPI/subdomain used by the launcher has no certificate of its own

Step 1 — Check the validity and details of the current certificate

In the browser, click the padlock (or the error warning) → "Certificate" to see the expiration date and the exact domain covered. Via terminal, it's faster and more reliable:

echo | openssl s_client -servername yoursite.com -connect yoursite.com:443 2>/dev/null | openssl x509 -noout -dates -subject

This returns the start/expiration date (notBefore/notAfter) and the subject (the domain the certificate was issued for). If the subject doesn't exactly match the accessed URL, that's the problem.

Step 2 — Fix an expired certificate with Let's Encrypt + Certbot

For servers running Nginx on Linux, renewal/issuance via Certbot is the most direct path:

sudo apt update && sudo apt install certbot python3-certbot-nginx -y
sudo certbot --nginx -d yoursite.com -d www.yoursite.com

Certbot automatically detects Nginx's server blocks, issues the certificate, and adjusts the configuration to serve HTTPS. To make sure this doesn't expire again without warning, set up automatic renewal:

sudo systemctl enable certbot.timer
sudo systemctl start certbot.timer
sudo certbot renew --dry-run

The --dry-run flag simulates the renewal without actually applying it, confirming the automatic process will work when the certificate is close to expiring (Let's Encrypt auto-renews ~30 days before expiration).

Step 3 — Fix a mismatched domain (Common Name Invalid)

If the error is ERR_CERT_COMMON_NAME_INVALID, the certificate was issued only for one variation of the domain (e.g., only www.yoursite.com, but the player accesses yoursite.com without www, or vice versa). The fix is to reissue it including all necessary variations:

sudo certbot --nginx -d yoursite.com -d www.yoursite.com -d panel.yoursite.com

Alternatively, set up a permanent (301) redirect from the variant without a certificate to the one that has one, avoiding keeping multiple active domains unnecessarily.

Step 4 — Correctly install the intermediate chain (Apache)

On Apache servers, a common mistake is installing only the domain certificate (cert.pem) without the CA's intermediate certificate (chain.pem or fullchain.pem), producing ERR_CERT_AUTHORITY_INVALID even with a valid certificate. The correct VirtualHost configuration:

<VirtualHost *:443>
    ServerName yoursite.com
    SSLEngine on
    SSLCertificateFile /etc/letsencrypt/live/yoursite.com/cert.pem
    SSLCertificateKeyFile /etc/letsencrypt/live/yoursite.com/privkey.pem
    SSLCertificateChainFile /etc/letsencrypt/live/yoursite.com/chain.pem
</VirtualHost>

Using fullchain.pem (which already combines the certificate + chain) instead of separate cert.pem + chain.pem is the simpler, less error-prone approach on recent versions of Apache and Nginx.

Step 5 — Equivalent, more robust configuration in Nginx

server {
    listen 443 ssl http2;
    server_name yoursite.com www.yoursite.com;

    ssl_certificate     /etc/letsencrypt/live/yoursite.com/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/yoursite.com/privkey.pem;
    ssl_protocols       TLSv1.2 TLSv1.3;
    ssl_ciphers         HIGH:!aNULL:!MD5;

    location / {
        proxy_pass http://127.0.0.1:3000;
    }
}

server {
    listen 80;
    server_name yoursite.com www.yoursite.com;
    return 301 https://$host$request_uri;
}

The second block ensures any access via plain HTTP is automatically redirected to HTTPS, preventing the player from accidentally accessing the insecure version.

Step 6 — Fix mixed content

If the padlock shows "broken" even with a valid certificate, the issue is usually mixed content: the page is loaded over HTTPS, but references images, scripts, or fonts via explicit http://. The fix is to change all hardcoded absolute URLs in the HTML/CSS/JS to a relative protocol or explicit HTTPS:

<!-- Wrong -->
<script src="http://yoursite.com/assets/launcher.js"></script>

<!-- Correct -->
<script src="https://yoursite.com/assets/launcher.js"></script>

Tools like the browser's DevTools (Console/Security tab) list exactly which resources are being blocked as mixed content.

Step 7 — Cover the subdomains used by the launcher and API

If the launcher consumes an API at api.yoursite.com or panel.yoursite.com, each subdomain needs its own valid certificate (or a wildcard covering all of them). To simplify maintenance with multiple subdomains:

sudo certbot --nginx -d yoursite.com -d www.yoursite.com -d api.yoursite.com -d panel.yoursite.com

Or, for a wildcard (requires DNS validation, not HTTP):

sudo certbot certonly --manual --preferred-challenges dns -d "*.yoursite.com" -d yoursite.com

Continuous expiration monitoring

Don't rely on automatic renewal alone — set up an external alert. Free services like UptimeRobot, or a simple cron script that runs the openssl command from Step 1 weekly and sends an alert to the team's Discord if expiration is less than 15 days away, will prevent surprises.

Common errors and fixes

SymptomLikely causeFix
"Connection is not private" on the siteExpired certificateRenew via certbot renew and enable certbot.timer
Error only when accessing without "www"Certificate doesn't cover both domain variantsReissue including -d yoursite.com -d www.yoursite.com
Padlock broken even with a valid certificateMixed content (resources over HTTP)Change hardcoded URLs to HTTPS
Launcher can't connect to the APIAPI subdomain has no certificate of its ownIssue a certificate for the subdomain or use a wildcard
ERR_CERT_AUTHORITY_INVALIDIntermediate chain not installedUse fullchain.pem in the web server configuration

SSL/TLS health checklist

  • Valid certificate with expiration date confirmed via openssl.
  • Certificate domain covers all accessed variants (www and without www).
  • Intermediate chain correctly installed (fullchain.pem).
  • Automatic renewal configured and tested with --dry-run.
  • HTTP → HTTPS redirection active on all domains.
  • No mixed content (HTTP resources) on the page served over HTTPS.
  • Launcher/API subdomains covered by a valid certificate.
  • External expiration monitoring configured.

With the site's and launcher's SSL stabilized, it's worth reviewing your infrastructure's overall security — firewall, exposed ports, and database backups — to close off the most common gaps in a private server. If you haven't documented your server's foundation yet, start with the MU Online server creation guide.

Frequently asked questions

Why does the browser show 'connection is not private' on my server's site?

Usually because the SSL certificate expired, was issued for a different domain than the one being accessed (e.g., missing 'www'), or the intermediate certificate chain wasn't installed correctly on the web server. The first step is checking the certificate's validity and exact domain.

Is Let's Encrypt secure enough for an MU Online server?

Yes. Let's Encrypt provides free TLS certificates widely accepted by all modern browsers, with automatable renewal via Certbot. It's the most popular option for mid-sized private servers because it has no cost and is easy to automate.

Do I need SSL only on the site, or also on the launcher/API?

Ideally both. If the launcher consumes an API (to check updates, web login, rankings) over plain HTTP, the data travels unencrypted and is vulnerable to interception. Whenever possible, unify everything under HTTPS with the same certificate or a wildcard certificate.

What is a wildcard certificate and when do I need one?

A wildcard certificate (e.g., *.viciadosmu.com) covers the main domain and all subdomains (panel, api, launcher) with a single certificate. It's worth it when you have multiple active subdomains, avoiding the need to issue and renew a separate certificate for each one.

Does a certificate expire automatically without me noticing?

Yes, Let's Encrypt certificates last 90 days and won't renew themselves unless you set up a cron job or an automatic renewal service (via Certbot). Without that, the site will show an 'insecure' warning recurringly every 3 months.

BR
Events, maps & items editor

Bruno specializes in MU Online events, maps, bosses and item economy. He documents every detail based on real gameplay.

Keep reading

Related articles