Fix "Unsafe" Browser or App Store Warnings for Your App
For customers whose website, web app, or packaged app was suddenly flagged as unsafe by a browser, search engine, or app store review. This runbook helps you identify the most common causes, confirm them with simple checks, and apply the right fix without guessing.
TL;DR — If a browser or app store suddenly flags your app as unsafe, the most common causes are malware on the site, a bad or expired TLS certificate (the certificate that proves your site identity), or a domain/reputation block from phishing or deceptive content reports. Start by checking the exact warning source, then verify your certificate and security headers, and scan the site files or app bundle for unexpected changes. Reading time: ~6 min
The scenario
It is a normal Tuesday afternoon: you ship a small content update, send the client the link, and they reply with a screenshot that says "Deceptive site ahead" in Chrome. At the same time, your mobile build that passed testing yesterday is now stuck in review with a message about malware, privacy, or unsafe behavior. Your app still loads for some people, your uptime monitor is green, and nobody on the team changed the login flow on purpose. You need to work out whether this is a certificate problem, a hacked site, a bad redirect, or a reputation block — fast.
Symptoms
- Browser interstitial (full-page warning) such as:
- "Deceptive site ahead"
- "The site ahead contains malware"
- "Your connection is not private"
- "NET::ERR_CERT_DATE_INVALID"
- "NET::ERR_CERT_COMMON_NAME_INVALID"
- "Warning: Potential Security Risk Ahead"
- Search result labels such as:
- "This site may be hacked"
- "This site may harm your computer"
- App store review or security notice such as:
- "App contains misleading or harmful behavior"
- "App requests permissions not relevant to core functionality"
- "Binary references known malicious domains"
- Users report redirects to unrelated pages, gambling pages, fake antivirus pages, or browser notification prompts.
- Security scanner or logs show unexpected outbound requests, for example:
GET /index.php?route=checkout --> 302 https://random-domain.example
- TLS/certificate checks fail, for example:
curl -Iv https://yourdomain.com
SSL certificate problem: certificate has expired
- Source or package review shows unexpected scripts, SDKs, or permissions.
Likely causes
| Cause | How common | Quick check |
|---|---|---|
| Site compromise injected malicious script or redirect | Very common | Open your site in an incognito window and view page source with `curl -sL https://yourdomain.com |
| TLS certificate expired, mismatched, or incomplete | Very common | curl -Iv https://yourdomain.com |
| Domain or URL reputation block (phishing/malware report) | Common | Search your exact warning text plus your domain in the browser's transparency/safe-browsing diagnostic page or provider notice |
| App bundle includes risky SDK, permission, or flagged endpoint | Common | Review the app manifest/permissions in your build settings or package contents |
| Misconfigured redirect or third-party asset loads unsafe content | Less common | curl -IL https://yourdomain.com |
| Downloaded file or installer is unsigned or changed after release | Less common | Check the code-signing status in your build/release dashboard or OS signing tool output |
Step-by-step diagnosis
-
Identify who is flagging the app.
- Browser warning page: take a screenshot and note the exact text.
- App store review: open the rejection or warning notice in the store console and copy the exact reason.
- What means "this is your problem": if the message mentions malware, deceptive content, or phishing, jump to Fixes → Site compromise injected malicious script or redirect or Fixes → Domain or URL reputation block. If it mentions certificate/privacy, jump to Fixes → TLS certificate expired, mismatched, or incomplete.
-
Check the certificate first.
- Command:
curl -Iv https://yourdomain.com
- What means "this is your problem": output contains errors like these:
SSL certificate problem: certificate has expired
SSL: no alternative certificate subject name matches target host name
unable to get local issuer certificate
- Jump to Fixes → TLS certificate expired, mismatched, or incomplete.
- Check for suspicious redirects.
- Command:
curl -IL https://yourdomain.com
- What means "this is your problem": you see a
301or302to an unrelated domain, shortened URL, or a domain you do not control. - Jump to Fixes → Misconfigured redirect or third-party asset loads unsafe content or Fixes → Site compromise injected malicious script or redirect.
- Check the homepage source for injected code.
- Command:
curl -sL https://yourdomain.com | sed -n '1,200p'
- What means "this is your problem": you see unfamiliar
<script>tags, hidden iframes, obfuscated JavaScript (long unreadable strings), or links to domains you do not recognize. - Jump to Fixes → Site compromise injected malicious script or redirect.
-
Check your hosting or CMS dashboard for recent file changes.
- In your provider's dashboard or file manager (for example, your host's File Manager, or your CMS plugin/theme editor history), review files changed in the last 24-72 hours.
- What means "this is your problem":
index.php,.htaccess, theme header files, JavaScript bundles, or upload folders changed unexpectedly. - Jump to Fixes → Site compromise injected malicious script or redirect.
-
Review app permissions and bundled SDKs.
- In your mobile build settings or repository, open the manifest/entitlements file and compare with the previous approved release.
- Android quick check:
grep -R "uses-permission" app/src/main/AndroidManifest.xml
- iOS quick check:
plutil -p ios/App/Info.plist | grep -E "Camera|Microphone|Location|Tracking"
- What means "this is your problem": new sensitive permissions, tracking declarations, or ad/fraud SDKs not required for app function.
- Jump to Fixes → App bundle includes risky SDK, permission, or flagged endpoint.
- Check whether the domain is already on a reputation blocklist.
- Use your browser/provider diagnostic page or the notice link included in the warning. If your DNS/security provider offers a threat event page, check there too.
- What means "this is your problem": the domain or URL is listed for malware, phishing, or social engineering.
- Jump to Fixes → Domain or URL reputation block.
View as text
[User Browser] ---- 1. opens app/site ----> [Your Domain]
|
| 2. warning or block
v
[Browser/App Store] ---- 3. cites reason ----> [You]
|
| 4. cert / redirect / malware / permissions
v
[Fix Section]Fixes
Site compromise injected malicious script or redirect
⚠️ If you delete files or roll back the wrong directory, you can cause downtime or lose recent content. Take a backup or snapshot first.
- Put the site in maintenance mode in your hosting dashboard, or temporarily restrict access to admins only.
- Restore known-good files from the last clean backup using your host's restore tool.
- Reset all admin passwords for hosting, CMS, database, and deployment accounts.
- Remove unknown admin users in your CMS/admin panel.
- Update the CMS, plugins, themes, and server packages to current supported versions.
- Search for common persistence files.
- CLI option if you have access:
find . -type f \( -name "*.php" -o -name "*.js" \) -mtime -7
grep -R "base64_decode\|eval(\|gzinflate\|document.write\|atob(" .
- Check web server redirect files:
cat .htaccess
- After cleanup, request a security review/reconsideration in the warning provider's console or notice page.
Verify it worked:
curl -sL https://yourdomain.com | grep -Ei "<script|iframe"
Only expected domains and scripts should appear.
TLS certificate expired, mismatched, or incomplete
- In your hosting or load balancer dashboard, open the TLS/SSL certificate section and reissue or renew the certificate for the exact hostname users visit (
example.comand/orwww.example.com). - If your provider supports automatic renewal, turn it on.
- Confirm DNS points to the correct server before reissuing.
- If you manage nginx directly, point it to the correct full chain certificate:
server {
listen 443 ssl http2;
server_name yourdomain.com www.yourdomain.com;
ssl_certificate /etc/letsencrypt/live/yourdomain.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/yourdomain.com/privkey.pem;
}
- Reload nginx:
sudo nginx -t && sudo systemctl reload nginx
Verify it worked:
curl -Iv https://yourdomain.com
You should see a successful TLS handshake and no certificate error.
Domain or URL reputation block
- Remove the underlying issue first: malware, deceptive copy, fake login prompts, or suspicious redirects.
- Open the warning provider's review/request form from the notice page and submit a review.
- In search engine webmaster/security tools, check the Security Issues or Manual Actions area and request validation after cleanup.
- If the block came from a DNS/security provider, open a support ticket with:
- exact blocked URL
- timestamp
- screenshot
- steps already taken
Verify it worked: the diagnostic page no longer lists the URL/domain as unsafe, and the warning page stops appearing after cache propagation.
App bundle includes risky SDK, permission, or flagged endpoint
- Remove unnecessary permissions from the manifest or plist.
- Android example:
<uses-permission android:name="android.permission.READ_CONTACTS" tools:node="remove" />
- iOS: remove unused privacy keys from
Info.plist.
- Remove or update the flagged SDK dependency in your package manager.
- npm example:
npm uninstall risky-sdk
npm install safe-supported-sdk
- Gradle example: remove the dependency line from
build.gradleand rebuild.
- Search the codebase for flagged domains/endpoints:
grep -R "bad-domain.example\|old-tracker.example" .
- Rebuild and resubmit with release notes that explain the removal.
Verify it worked: the new build contains only expected permissions and the store review no longer cites the flagged SDK/behavior.
Misconfigured redirect or third-party asset loads unsafe content
- Review redirect rules in your hosting dashboard, CDN rules page, or web server config.
- Remove any rule that sends traffic to a domain you do not control.
- If using nginx, inspect and fix
returnorrewritedirectives:
server {
server_name yourdomain.com;
return 301 https://www.yourdomain.com$request_uri;
}
- Check page source for third-party scripts loaded over unexpected domains and remove them from your template or tag manager.
Verify it worked:
curl -IL https://yourdomain.com
Every redirect hop should go only to your expected domain(s).
Downloaded file or installer is unsigned or changed after release
- Rebuild the installer/package from a clean CI job.
- Sign it with your normal code-signing certificate in your release pipeline.
- Publish the signed artifact only from CI, not from a developer laptop.
- Replace any manually edited release files.
Verify it worked: your OS signing check or release dashboard shows the artifact as signed and matching the current build hash.
Prevention
- Add certificate expiry monitoring to CI or uptime checks:
echo | openssl s_client -servername yourdomain.com -connect yourdomain.com:443 2>/dev/null | openssl x509 -noout -dates
Alert if expiry is under 14 days.
- Pin dependency review in CI for web and mobile builds:
npm audit --omit=dev
and fail builds when a newly added package is high risk.
- Diff app permissions in CI before release:
git diff --unified=0 origin/main...HEAD -- app/src/main/AndroidManifest.xml ios/App/Info.plist
Require approval for any new sensitive permission.
- Add file integrity monitoring for public web roots. At minimum, hash key files after deploy:
sha256sum public/index.php public/.htaccess public/assets/app.js > deploy-manifest.sha256
Compare on a schedule and alert on drift.
- Restrict who can change DNS, redirects, and tag manager scripts. Use separate accounts and turn on MFA (multi-factor authentication) for hosting, registrar, and app store logins.
- Keep a clean rollback path in CI/CD: one-click restore of the previous release artifact and a backup taken before each production deploy.
This article was written by an AI system and published pending human review. Verify anything you intend to act on.
Have a project in mind?
Get an instant AI price estimate for it, or talk directly to our team.
One email a month on what we learn building with AI