A 404 Page Not Found error usually means the web server is reachable, but the specific page, file, or route requested by the visitor does not exist at that address. In a hosting environment, this can be caused by a deleted file, a broken link, an incorrect rewrite rule, a changed CMS permalink, or a domain pointing to the wrong document root. The good news is that a 404 is often straightforward to diagnose once you check the URL, the site configuration, and the application settings.
If you manage a website on a hosting platform, in a control panel such as Plesk, or on an Apache-based server, the fix normally starts with verifying whether the missing page is genuinely gone or whether the request is being routed incorrectly. Below you will find practical steps to identify the cause and restore the correct page behavior.
What a 404 error means
A 404 response is an HTTP status code that tells the browser the server understood the request, but cannot find the resource. This is different from a 500 error, which points to a server-side failure, or a DNS issue, where the browser cannot reach the site at all. With a 404, the domain usually works, but a specific page does not.
Common examples include:
- A blog post URL changed after a content update.
- A product page was deleted but internal links still point to it.
- Apache rewrite rules or .htaccess rules are missing or broken.
- WordPress permalinks were reset after a migration.
- The domain’s document root points to the wrong directory in Plesk.
Common reasons for a 404 Page Not Found error
1. The page was moved or deleted
If the content no longer exists at that path, the server returns a 404. This is common after redesigns, content audits, or migrations. In that case, the fix is usually to restore the page, create a redirect, or update internal links.
2. The URL was typed incorrectly
Even a small typo can cause a 404. Misspelled folder names, incorrect file extensions, uppercase and lowercase mismatches on case-sensitive systems, and extra characters in the path are all frequent causes.
3. Rewrite rules are not working
Many CMS platforms rely on URL rewriting to generate clean URLs. If Apache rewrite support is disabled, .htaccess is not being read, or the rules are malformed, a valid page may appear as missing.
4. The site points to the wrong document root
In a hosting control panel, the domain may be configured to serve files from the wrong directory. When that happens, the server may not find the expected index file or application entry point.
5. CMS permalinks or routing settings changed
Platforms like WordPress, Joomla, and Drupal often generate routes dynamically. If permalink settings are changed, caches are stale, or routing configuration is incomplete, the site may return 404s for pages that should exist.
6. Missing files after migration
During transfers between hosting accounts or servers, files and folders can be skipped if the migration is incomplete. Images, static assets, and application routes may then produce 404 errors.
How to fix a 404 error step by step
1. Confirm the exact URL
Start by checking the requested address carefully. Look for:
- Spelling mistakes in folder or file names
- Missing or extra slashes
- Incorrect file extensions such as .html, .php, or .htm
- Uppercase versus lowercase differences
- Trailing slash differences on custom applications
If the page opens when you adjust the URL manually, the issue is likely in the link itself rather than the server.
2. Refresh the page and clear browser cache
Sometimes the browser stores an outdated version of the URL or redirects. Try a hard refresh, open the page in a private window, or clear the browser cache. This is especially useful after recent site changes.
3. Check whether the page exists on the server
Use your hosting file manager, FTP, or SSH access to confirm that the file is actually present. In a typical Apache setup, look in the site’s document root for files such as:
- index.php
- index.html
- application entry files for your CMS or framework
- the specific page file if you use static pages
If the file is missing, restore it from backup or recreate the content.
4. Verify the document root in Plesk or your hosting panel
In a managed hosting environment, the domain may be linked to the wrong root folder. For example, the site might point to a subdirectory that no longer contains the application. In Plesk, check the domain’s hosting settings and confirm that the document root matches the actual site files.
Typical issues include:
- The domain is mapped to a staging folder instead of the live site
- The application was moved but the domain settings were not updated
- An alias or subdomain points to a folder that does not contain the required files
5. Review Apache rewrite rules and .htaccess
If the site uses clean URLs, the issue may be in the .htaccess file or Apache configuration. Check that rewrite support is enabled and that the file contains valid rules. A broken rule can send requests to nonexistent paths and generate 404s.
Useful checks include:
- Ensure the .htaccess file exists in the correct directory
- Confirm that mod_rewrite is enabled on Apache
- Look for syntax errors or incorrect conditions
- Make sure the rules are appropriate for your CMS
If you recently edited .htaccess, temporarily rename it and test again. If the 404 disappears, the problem is likely in that file.
6. Reset CMS permalinks or routing
For content management systems, regenerating the permalink structure often fixes 404s. In WordPress, for example, saving the permalink settings again can rebuild rewrite rules. In other systems, you may need to clear caches, rebuild routes, or refresh the routing table.
If you use a framework or custom application, check the routing file, controller mapping, and base URL configuration. A mismatch between the app’s base path and the actual domain path can cause consistent 404 responses.
7. Check for redirects that point to missing pages
A redirect chain can lead users to a page that no longer exists. Review any 301 or 302 redirects configured in the control panel, application, or .htaccess file. Make sure the destination URL returns a valid page.
This is particularly important after:
- Domain changes
- URL restructuring
- Site migrations
- Category or slug changes in a CMS
8. Restore missing files from backup
If the 404 affects only certain images, downloads, or pages, restore the missing files from a recent backup. Managed hosting platforms typically offer backups through the control panel or backup service. After restoring, verify the file permissions so the web server can read the content.
9. Check file and folder permissions
Incorrect permissions can sometimes behave like missing files. If Apache cannot read a file or enter a directory, users may see a 404 or a similar error depending on the server configuration. Make sure permissions are sensible and consistent with your hosting provider’s recommendations.
As a general reference:
- Files often use 644 permissions
- Directories often use 755 permissions
Avoid making everything writable unless your application specifically requires it.
10. Look at error logs
Error logs are one of the fastest ways to identify the source of a 404. In a hosting control panel, you may find domain logs, Apache logs, or application logs. Search for the requested path and note whether the server is looking in the wrong directory, applying a bad rewrite rule, or failing to locate a file that should exist.
Logs can reveal patterns such as:
- Repeated requests for old URLs
- Missing index files
- Rewrite loop problems
- Incorrect path mappings after migration
Fixing 404 errors in common hosting scenarios
WordPress on Plesk or Apache
If WordPress pages return 404 but the homepage works, the issue is often permalink-related. Go to the permalink settings and save them again to refresh the rewrite rules. Then confirm that the .htaccess file is present and writable, and that Apache rewrite support is enabled on the server.
If media files are missing, check the wp-content/uploads directory and confirm that the files were migrated correctly.
Static HTML websites
For static sites, 404s are often caused by incorrect file paths or renamed files. Verify the link targets, folder names, and capitalization. If your site uses index.html, make sure the web server is configured to serve it as the default file.
Custom PHP applications
In custom PHP sites, 404s usually come from routing logic, front controller setup, or base path configuration. Confirm that requests are being routed to the correct entry file and that the application knows whether it is installed in the root domain or a subdirectory.
Web applications behind rewrites
If a framework depends on clean URLs, test both the main route and a known internal page. If only certain paths fail, inspect the routing table, web server rewrite directives, and any reverse proxy configuration that may be rewriting the request incorrectly.
How to prevent 404 errors on your website
- Use 301 redirects when changing URLs or deleting content.
- Update internal links after moving pages.
- Keep permalink or routing settings consistent after site changes.
- Test the site after migrations, theme changes, and control panel updates.
- Monitor logs for recurring missing-page requests.
- Maintain regular backups so deleted files can be restored quickly.
- Use a custom 404 page that helps visitors find useful content.
Use a helpful custom 404 page
A custom 404 page does not fix the missing resource, but it improves user experience. A good page should explain that the content could not be found and offer next steps such as searching the site, returning to the homepage, or visiting popular categories. This is especially useful on larger hosting platforms where visitors may reach outdated URLs from bookmarks or external links.
SEO impact of 404 errors
Some 404s are normal and even expected, but too many broken URLs can hurt user experience and waste search engine crawl budget. Search engines may continue to crawl outdated pages if they are linked from elsewhere. For that reason, it is important to redirect permanently moved pages and remove internal links to missing content.
Best practices for SEO include:
- Use 301 redirects for permanently moved pages
- Return a real 404 for content that should no longer exist
- Do not redirect all missing pages to the homepage
- Keep important URLs stable when possible
- Audit broken links after redesigns and migrations
When the 404 is not actually a 404
Sometimes a site shows a page-not-found message even though the server is returning a different code. This can happen if the application handles errors internally and displays a custom message. If the page seems wrong but the web server logs show another status, check the application layer, theme templates, or reverse proxy rules.
Similarly, a misconfigured site may return a 200 OK status with an error page displayed in the browser. That is worse for SEO and should be corrected so the server sends the proper HTTP status code.
FAQ
Why am I getting a 404 on only one page?
Usually the page was moved, deleted, or linked with the wrong URL. Check the exact path, confirm the file exists, and review redirects or rewrite rules.
Why do some URLs work and others return 404?
This often points to rewrite rules, CMS permalinks, or routing issues. It can also happen when only part of a migration completed successfully.
How do I fix 404 errors in Plesk?
Check the domain’s document root, confirm the site files are in the correct folder, review Apache directives and .htaccess, and refresh CMS permalink settings if the site uses a dynamic platform.
Can a 404 be caused by DNS?
Not usually. DNS problems normally prevent the site from loading at all. A 404 means the server was reached, but the requested page was not found.
Should I redirect every 404 to the homepage?
No. That can confuse users and search engines. Only redirect URLs that have a clear replacement. Otherwise, return a proper 404 and offer useful navigation options.
What should I check after a migration?
Verify the document root, application base URL, file permissions, rewrite rules, internal links, media files, and redirects. Then test common pages and any high-traffic URLs.
Conclusion
A 404 Page Not Found error is usually a sign that the requested URL does not match the files, routes, or redirects on your hosting account. In most cases, the fix is to confirm the correct path, check the document root, review Apache or .htaccess rewrite rules, and restore missing content or redirects. On managed hosting platforms and in Plesk, a careful check of site configuration often resolves the issue quickly.
If the problem appeared after a migration, redesign, or CMS update, focus first on routing, permalinks, and file placement. If it affects old URLs, use redirects where appropriate. If it affects only one resource, restore the missing file or correct the link. A structured review of the URL, server configuration, and application settings will usually lead you to the cause.