Find the Best Cosmetic Hospitals

Explore trusted cosmetic hospitals and make a confident choice for your transformation.

“Invest in yourself — your confidence is always worth it.”

Explore Cosmetic Hospitals

Start your journey today — compare options in one place.

HTTP 404 for DevOps: Root-Cause, Routing, and Prevention Across Edge, Ingress, and App Layers

HTTP 404 errors look straightforward to end users, but in real-world platforms they can originate from several layers: edge, ingress, reverse proxy, or application routing. This guide is for DevOps engineers who need a fast, repeatable way to isolate the source, fix it safely, and reduce recurring not-found incidents.

Originally published on 2014-07-21; fully revised and updated.

What an HTTP 404 means operationally

A 404 Not Found response means the server handling the request could not find a resource at the requested path. In distributed deployments, this does not immediately prove the application is broken; it may indicate routing, rewrite, cache, or host-header mismatches before traffic even reaches the app.

Where 404s commonly originate

LayerTypical 404 causeFirst check
CDN or load balancerPath rule, origin mapping, or stale cache behaviorEdge logs and cache config for the exact URL
Ingress or API gatewayHost/path mismatch, missing rewrite, wrong backend serviceIngress route definitions and host header used in request
Reverse proxy (Nginx/Apache)Location block mismatch or try_files behaviorEffective server block and access logs
Application routerMissing endpoint or route regression after deployApp route map and release diff
Content/data storeResource deleted, unpublished, or wrong identifierLookup of expected object in datastore/CMS

404 triage workflow

Use a top-down flow: reproduce the error, determine which layer generated it, then patch the specific route or resource. This avoids chasing application bugs when the issue is at the edge.

flowchart TD
    A[User reports missing page] --> B[Reproduce with curl and host header]
    B --> C{Response is 404?}
    C -- no --> D[Investigate non 404 issue]
    C -- yes --> E[Check CDN or load balancer logs]
    E --> F{404 at edge?}
    F -- yes --> G[Fix edge route or cache rule]
    F -- no --> H[Check ingress or reverse proxy routes]
    H --> I{Route match exists?}
    I -- no --> J[Fix path mapping or rewrite]
    I -- yes --> K[Check app routes and resource data]
    K --> L[Deploy fix and add alert]

Step-by-step checks with commands

Reproduce from the client side and with explicit host header

curl -i https://example.com/docs/install
curl -i -H "Host: example.com" http://INGRESS_IP/docs/installCode language: JavaScript (javascript)

The second request helps confirm whether DNS/CDN behavior differs from direct ingress behavior.

Validate Kubernetes ingress and service wiring

kubectl get ingress -A
kubectl describe ingress my-app -n prod
kubectl get svc -n prod
kubectl get endpoints my-service -n prodCode language: JavaScript (javascript)

Look for host/path rules that do not match the failing URL, and ensure the target service has healthy endpoints.

Confirm reverse-proxy route behavior

server {
    listen 80;
    server_name example.com;

    location / {
        try_files $uri $uri/ =404;
    }

    error_page 404 /404.html;
    location = /404.html {
        internal;
    }
}Code language: PHP (php)

Choose the right response code

Status codeUse whenOperational note
404 Not FoundResource is not found at the requested pathGood default for unknown or missing URLs
410 GoneResource was intentionally removed and will not returnUseful when removal is deliberate and permanent
403 ForbiddenResource exists but access is deniedAvoid replacing auth failures with 404 unless policy requires it

Monitor 404 trends before users escalate

Track top missing paths and sudden spikes. Even simple log analysis can reveal broken links, bad rewrites, and deployment regressions quickly.

awk '$9 == 404 {print $7}' /var/log/nginx/access.log | sort | uniq -c | sort -nr | head -20Code language: JavaScript (javascript)

Best practices

  • Test critical URLs in CI/CD after each deployment.
  • Validate host and path routing at every layer (edge, ingress, proxy, app).
  • Use consistent rewrite rules across environments to avoid drift.
  • Create alerts on abnormal 404 rate changes, not only absolute counts.
  • Serve a helpful custom 404 page, but keep the HTTP status code accurate.

Find Trusted Cardiac Hospitals

Compare heart hospitals by city and services — all in one place.

Explore Hospitals
I'm Rajesh Kumar, a DevOps, SRE, DevSecOps, Cloud, and Platform Engineering expert passionate about sharing practical knowledge, real-world experiences, and industry best practices. I have worked at Cotocus and regularly write about technology, travel, investing, health, product reviews, and digital marketing through my various platforms. I publish technical articles at DevOps School, travel stories at Holiday Landmark, stock market insights at Stocks Mantra, health and fitness guidance at My Medic Plus, product reviews at TrueReviewNow, and SEO and digital marketing strategies at Wizbrand.

Related Posts

Top 10 AI Fraud Detection Tools in 2026: Features, Pros, Cons & Comparison

Introduction In 2026, the global financial landscape faces unprecedented challenges from sophisticated fraud tactics, including deepfakes, synthetic identity fraud, and automated bot attacks. AI fraud detection tools…

Read More

Toptal Alternatives: 6 Best Platforms to Hire Remote Tech Talent

Are you looking for remote developers, designers, or project managers, without Toptal’s price tags and wait times? You’re not alone. We’ve been through the search ourselves, and…

Read More

List of Best Compliance Automation Tools

What Are Compliance Automation Tools Used For? Compliance automation tools are software platforms designed to help organizations meet industry, regulatory, and security standards—with less manual effort, fewer…

Read More

Top 10 AI Compliance Audit Tools in 2026: Features, Pros, Cons & Comparison

Introduction In 2026, AI compliance audit tools are indispensable for organizations navigating the complex regulatory landscape driven by rapid AI adoption. With 78% of companies integrating AI…

Read More

Top 10 HIPAA Compliance Tools in 2026: Features, Pros, Cons & Comparison

Introduction HIPAA (Health Insurance Portability and Accountability Act) compliance is essential for healthcare organizations to ensure the security and privacy of patient data. With cyber threats becoming…

Read More

What is a GitHub App?

🧠 What is a GitHub App? A GitHub App is a first-class actor in the GitHub ecosystem. Unlike OAuth apps which act on behalf of a user,…

Read More
Subscribe
Notify of
guest
0 Comments
Newest
Oldest Most Voted
0
Would love your thoughts, please comment.x
()
x