Error 404 on a page that should exist: the causes, in order

The short answer: error 404 means “the server is working but cannot find what was asked for”. For a page you know exists, the causes are almost always a file name with different upper and lower case, the file in the wrong folder, a missing rewrite rule, or a link changed with no redirect.

The causes, in order

Cause How to recognise it What to do
Upper and lower case The file is called Contact.html and the link is contact.html. On Linux they are different files (on your computer it may work). Always use lower case and no spaces in file and folder names.
The file is not where you think The address is domain.com/page but the file is in a subfolder, or outside the site’s root. See Where your website files go.
The entry file is missing The address is a folder and there is no index.html or index.php. Create the entry file: Directory indexes.
A site with “pretty” addresses (WordPress, Laravel) whose rules disappeared The home page opens and every other page gives 404. In WordPress, see WordPress permalinks and the 404 that follows. In others, the .htaccess: .htaccess for PHP projects.
The page changed address with no redirect Whoever has the old link (Google, another site) lands on the 404. Create a 301 redirect to the new address: 301 redirects.
It is on the wrong domain The domain opens another site, or the domain’s folder is not the one you think. See A domain that opens the wrong site.

For Google and for visitors

1 See which pages really give 404: Search Console lists them: Crawl errors in Search Console.
2 For those that moved, make the redirect. For those that are gone, leave the 404, but with a useful page.
3 Make a 404 page of your own with search and the main links: Custom error pages.
Do not redirect everything that gives 404 to the home page. Google treats it as a disguised error, and the visitor is left not knowing what happened.

The page exists and still gives 404? Open a ticket with the exact address and the file’s path.

Open a support ticket

SEE ALSO

Where your website files go: public_html, folders and which domain uses which

WordPress permalinks and the 404 that follows

301 redirects when you change a page or a domain

Website errors explained: 500, 403, 404, 508 and what to do

RECOMMENDED PRODUCT

Web hosting with cPanel

Domain and SSL included, daily backups and the panel you already know. from 5.940,00 Kz/mo (3-year plan, with coupon)

See plans
  • 0 Users Found This Useful
Was this answer helpful?