A 404 says Apache looked where the URL told it to and found nothing. When the file is clearly sitting in File Manager, the URL and the filesystem disagree about where “there” is: the domain’s document root points at a different folder, the filename case does not match, a rewrite rule is sending the request elsewhere, or the domain you are testing is not the domain that owns those files. The fix is to reconcile the path the browser asks for with the path on disk.
What’s happening
Every domain on a cPanel server has a document root — the folder Apache treats as the top of that site. For the primary domain it is /home/<cpaneluser>/public_html; for addon and subdomains it is a subfolder, often /home/<cpaneluser>/public_html/<addon> or /home/<cpaneluser>/<subdomain>. A request for https://example.com/about/page.html resolves to <docroot>/about/page.html. If the file you uploaded sits in public_html/page.html but the domain’s docroot is actually public_html/example.com/, Apache looks one level off and returns 404 — the file exists, just not where that domain points.
Three other causes produce the same 404. Linux filesystems are case-sensitive: Page.HTML and page.html are different files, so a link written in the wrong case 404s even though “the file is there.” A mod_rewrite rule (a WordPress permalink block, a front-controller RewriteRule, a stale redirect) can route the URL to a script or path that does not exist. And on multi-domain accounts it is easy to test the wrong hostname — the files belong to an addon domain whose docroot you have not actually pointed at, so the parked/primary domain serves a 404 for paths it never had.
How to verify
Confirm the domain’s real document root first — this is the answer most of the time.
# Document root and account for the exact domain
grep -i "<domain>" /etc/apache2/conf/httpd.conf | grep -i documentroot
# or, the cPanel-maintained map of domain -> docroot:
grep -i "<domain>" /etc/userdatadomains
cat /var/cpanel/userdata/<cpaneluser>/<domain> | grep -i documentroot
Now compare that docroot to where the file actually is on disk:
# Is the file where the docroot expects it?
ls -la /home/<cpaneluser>/public_html/about/
find /home/<cpaneluser> -name 'page.html' 2>/dev/null
# Case matters — these are different files on Linux
ls -la /home/<cpaneluser>/public_html/ | grep -i page
Watch the access and error logs while you reload — they record the exact path Apache tried.
# The access log shows the requested path and the 404 status
tail -f /home/<cpaneluser>/logs/<domain>.error.log
grep ' 404 ' /home/<cpaneluser>/access-logs/<domain> | tail -20
# error_log will show File does not exist with the full path tried
# File does not exist: /home/user/public_html/example.com/about/page.html
If a rewrite is involved, inspect the .htaccess that governs the directory:
cat /home/<cpaneluser>/public_html/.htaccess
grep -rn 'RewriteRule\|RewriteBase\|Redirect' /home/<cpaneluser>/public_html/.htaccess
The fix
- Files in the wrong document root — the most common cause.
error_logshows Apache trying.../example.com/about/page.htmlwhile your files are inpublic_html/about/. Either move the files into the domain’s real docroot, or point the domain’s document root at the folder that holds the files (WHM » Modify an Account for the primary; for addon/subdomains, recreate or edit in cPanel » Domains). Confirm withgrep documentrootafterward. - Filename case mismatch — the link says
Logo.PNG, the file islogo.png. Linux treats these as different files. Either rename the file to match the link, or fix the link in the page source. Sites migrated from Windows or macOS (both case-insensitive) hit this constantly after moving to a Linux cPanel host. - Rewrite rule sending the request away — a
RewriteRuleor staleRedirectin.htaccessroutes the URL to a missing target. Test by renaming the file (mv .htaccess .htaccess.bak) and reloading; if the 404 clears, the rule is the cause. For WordPress, regenerate permalinks under Settings » Permalinks so the rewrite block matches the current structure. - Wrong domain pointing — the files belong to an addon domain whose docroot was never actually set, so you are hitting the primary domain. In cPanel » Domains, confirm the addon domain exists and its document root matches the folder with the files. A parked domain with no content of its own will 404 for any deep path.
- Missing trailing-slash or DirectoryIndex — a request for a directory with no index file 404s (or 403s) instead of serving content. Confirm an
index.html/index.phpexists in that folder, or add the intended file. Frameworks that route everything throughindex.phpneed their rewrite block intact for deep URLs to resolve. - Custom 404 masking a real one — a site may serve its own styled “page not found” with a 200 or a soft 404, hiding which paths truly fail. Check the raw status with
curl -I https://example.com/about/page.htmland read theHTTP/...line rather than trusting the rendered page. - Newly created file not yet readable — rare, but a file uploaded as the wrong user or with no read bit can read as “missing” to Apache. Confirm ownership
<cpaneluser>:<cpaneluser>and mode0644(see the 403 runbook); aPermission deniedin the log is a 403, not a true 404.
Once the docroot, the filename case, and any rewrite all agree on the same path, reload and confirm the access log records a 200 for that URL — a matching path on disk and in the log is the proof. Stack Harbor handles cPanel document-root and rewrite triage under cPanel/WHM management — start a conversation.