MYHOSPITALNOW.COM

Find Trusted Doctors & Hospitals

Discover healthcare providers, compare hospitals, and explore treatment options worldwide.

Free Treatment Quotes • Doctor Search • Hospital Comparison

Find Healthcare Options

www.myhospitalnow.com

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 Data Preparation Tools in 2026: Features, Pros, Cons & Comparison

Introduction Data preparation is one of the most time-consuming aspects of any data analytics project. It involves collecting, cleaning, transforming, and organizing raw data to ensure it…

Read More

Top 10 AI Low-Code Development Platforms Tools in 2026: Features, Pros, Cons & Comparison

Introduction In 2026, AI low-code development platforms are transforming how businesses build and deploy AI-driven applications. These platforms empower developers, business analysts, and even non-technical users to…

Read More

Splunk Observability Cloud vs Splunk AppDynamics vs Splunk Cloud Platform

Here’s a clear and updated comparison between Splunk Observability Cloud, Splunk AppDynamics, and Splunk Cloud Platform, highlighting their purpose, strengths, and ideal use cases: 📦 Product Overview…

Read More

Top 10 Virtualization Software Tools in 2026: Features, Pros, Cons & Comparison

Introduction Virtualization software is one of the foundational technologies driving the IT landscape in 2026. With the growing demand for cloud computing, IT professionals and businesses are…

Read More

Top 10 Patch Management Tools in 2026: Features, Pros, Cons & Comparison

Introduction: The Importance of Patch Management in 2026 In 2026, as cyber threats evolve and technology becomes more complex, patch management tools are critical for maintaining cybersecurity…

Read More

Top 10 Remote Monitoring & Management (RMM) Tools in 2026: Features, Pros, Cons & Comparison

Introduction In today’s fast-paced, technology-driven world, businesses rely on the seamless functioning of their IT infrastructure. This makes Remote Monitoring & Management (RMM) tools essential for managing,…

Read More
Subscribe
Notify of
guest
2 Comments
Newest
Oldest Most Voted
Puja kushwaha
Puja kushwaha
19 days ago

A 404 error can be frustrating, but it can also help reveal broken links or outdated page addresses. Website owners should check internal links and set up redirects when pages move. A clear error page should offer a search option or a link back to the main site. Regular link checks can help visitors find the information they need without extra effort. These small steps improve navigation and make the site easier to use.

Daniel Carter
Daniel Carter
30 days ago

From an operational perspective, a 404 page should do more than inform visitors that content is unavailable. Tracking repeated 404 requests through web server logs and analytics can help identify broken internal links, outdated bookmarks, and URLs affected by site migrations. For pages that have moved permanently, appropriate redirects can preserve navigation and avoid losing useful search traffic. It is also worth monitoring recurring errors after deployments so that routing or configuration problems can be detected before they affect more users.

2
0
Would love your thoughts, please comment.x
()
x