What you are actually seeing
Before hunting for causes, pin down the symptom. You open https://yourdomain.com/ and the homepage loads; but as soon as you click «About», «Blog», «Services», a post or a product page, what shows up is a 404 (your theme's «not found» template or the server's generic one).
This is not the same as the whole site being down, a 500 error or a blank white screen. If the homepage responds normally and only the other URLs fail, the cause almost always sits in how your server delivers WordPress «pretty» URLs, the ones with a readable name instead of a numeric id.
Before moving on, write down three things: the browser you see the error from, the device and the network (office, home, mobile data). Note the approximate time too.
Why only inner pages fail and not the homepage
That the homepage works and the rest do not is a pattern, not a coincidence. WordPress serves the front page directly from index.php, which the server finds at the root of the domain. That is why the homepage survives: it needs no URL «translation» to answer.
Inner pages are a different story. URLs like /about/, /blog/ or /services/ are pretty permalinks: not real files, but routes WordPress interprets internally. For them to work, the web server rewrites them and hands them to index.php. WordPress publishes that rewrite through a hidden file called .htaccess (on Apache) or a configuration block with location and try_files directives (on NGINX).
If those rules are lost, emptied or invalidated, the server does not know what to do with /about/ and answers 404, because no file with that name exists. The homepage does not notice. The fine detail is in the official WordPress documentation on permalinks.
Before you touch anything: check and write it down
Before logging in to change settings, spend five minutes observing:
- Open the affected URL in a new private window, without signing in to WordPress. Record whether the 404 remains. A difference may point towards session state, extensions, caches or a feature that behaves differently when signed in; this test alone does not identify the cause.
- Try another network or device and record whether the result differs. This can point towards caches, filtering or configuration; it does not rule out every site-side cause.
- Write down the real HTTP code. A «404 with the WordPress template» differs from a «server 404», and both from a 403, a 500 or a soft 404 (a 200 response carrying not-found content). The network tab of the developer tools shows it. The Google Search Central guide on HTTP status codes explains what Google expects in each case.
- Try to log into
/wp-admin/. If the panel loads, the WordPress core is alive and it is most likely a rewrite issue. If the panel also fails, the diagnosis changes. - Review what changed just before: a core, theme or plugin update; a new SEO, cache or security plugin; a permalink change; a migration, domain or host move; a backup restore.
- Check whether other parts also fail: the RSS feed (
/feed/), author archives, the sitemap, internal search. If everything but the homepage returns 404, the pattern clearly points to rewriting.
Put all of this in a short note: it avoids repeating steps and it is what whoever maintains your website or host will ask for.
The three most common causes
When the symptom is «homepage fine, rest returning 404», the cause falls almost always in one of these three families. Recognising which one you are in saves steps:
| Cause | When it fits | Hints to recognise it |
|---|---|---|
| Permalink rules that need regenerating | You updated WordPress, a plugin or the theme; you changed the permalink setting; you restored a backup. | The admin panel loads fine; in Settings you can view the permalink configuration without errors; the 404 hits every inner page equally. |
.htaccess missing, empty or overwritten | You are on Apache; a cache or security plugin, or an installer, touched the file; you edited it manually. | The .htaccess in the root is missing, empty or contains rules different from the standard WordPress ones; the error appeared suddenly without touching the panel. |
| Migration, domain change or host change | You moved the site, changed provider, changed the main domain or moved from staging to production. | On the new server there is no .htaccess or the NGINX config is missing; database paths still point to the previous domain; some links load but general navigation returns 404. |
Sometimes two causes coexist and the third shows up after ruling out the others. Identifying it gives the place to start looking.
What changes with Apache versus NGINX
The two most common web servers are Apache and NGINX, and the difference matters because the place where rewrite rules live is different in each one.
On Apache, the rules live in the .htaccess file WordPress writes at the root. For them to work, mod_rewrite has to be enabled; the module that translates pretty URLs is described in the official Apache documentation on mod_rewrite. On managed installations it is usually on; on older shared hostings it may not be.
On NGINX there is no .htaccess. The configuration lives in the site block and rewriting is usually achieved with a try_files directive: «if the URL does not match a real file or folder, pass it to index.php». It is described in the official NGINX documentation on try_files. The host or your system administrator handles that configuration, not WordPress.
Hosting support can confirm which server handles the pages and where rules apply. Several components may sit in front of WordPress; one header or an existing .htaccess file does not describe the whole setup. Do not create or replace rules until you know which configuration the installation uses.
What to check first and how to prepare a change
Before changing settings, confirm that a recoverable backup is available and record the current configuration. Agree with whoever maintains the website which tests belong in a copy and which changes need a controlled intervention on the live site.
- Review permalink settings. With authorisation, Settings → Permalinks allows you to save the current settings without selecting a different URL structure. WordPress may regenerate its rules, but this cannot fix every server configuration. The rewrite-rule reference explains the mechanism.
- Check rules with the technical team. Apache may use
.htaccess; NGINX uses site configuration. Keep the previous version and do not replace the whole file with a generic block that could remove other necessary rules. - Confirm ownership and permissions with hosting support. Appropriate values depend on the server and service account. Do not apply
777or recursive permission changes as a test. - Check for a cached 404. The team can invalidate the affected response without routinely disabling the CDN or site protections.
After each adjustment, test several affected URLs and important functions. One page returning 200 does not establish that all navigation is fixed.
What to check next if the 404 stays
If the previous steps have not brought an inner URL back to 200, something above or below WordPress is most likely rewriting URLs:
- Test possible conflicts in an isolated copy. Whoever maintains the website can review components that manage URLs and check changes individually. Do not disable security, SEO or language plugins on the live site as a first test.
- Check the theme in that copy. If it adds its own rules or functions, comparison with a test configuration may provide clues. Switching the live site to a default theme can alter pages and functionality; do not do so without a recovery plan.
- Review manual redirect rules. In the redirect plugin or directly in
.htaccess, there may be old rules pointing to URLs that no longer exist or catching patterns too broad. A badly written wildcard can send everything but the homepage to a 404. - Look at server logs. The host panel usually provides access and error logs. Searching the affected URL there tells you what the server is doing: whether it rewrites it to something non-existent, refuses it, or hands it to
index.phpand PHP resolves it badly. This is the most reliable information. - Ask host support with a precise message. On Apache, ask them to confirm
mod_rewriteis active and that no global rules clash with the.htaccess; on NGINX, that they review the site block and thetry_filesdirective. Attach the URL, the time of a failed request and a screenshot of the 404.
Some server configurations can only be changed by the host or whoever maintains your website; your role is to share the affected URLs, messages and checks so the team can investigate. If the 404 landed right after an update, reviewing what usually fails when WordPress stops working after an update gives extra hints; if 500s also show up, they are a different family, that of the WordPress 500 internal server error.
Stop it from happening again
Once inner URLs respond again, it is a good moment to put a few things in place that reduce the chance of repeating it:
- Backups before big changes: WordPress updates, installing or removing major plugins, server configuration changes. They give you room to roll back without rushing.
- Staging environment. Many hosts offer it with a single click. It is the natural place to apply updates before production.
- List redirects and rules when migrating. Before changing host, domain or web server, document which rules were living in
.htaccessor NGINX. We cover that transition in website migration and SEO. - Document which plugin touches what. If several rewrite or redirect URLs (SEO, multilingual, specific redirects), note which one owns which area.
- Monitor more than the homepage. Add a meaningful inner URL (contact, a blog post) to the periodic check. Checking both pages may help you detect a failure earlier, but it does not guarantee that other URLs or functions are working.
- Review Search Console after the incident. Check examples in the Page indexing report and inspect corrected URLs where useful. This tracks the search engine’s view; it does not replace navigation checks on the website.
Fictional example: a small business installs a cache plugin on a Friday afternoon; that night it rewrites the .htaccess and places its own rules above the standard WordPress ones. On Saturday morning the homepage opens and everything else returns 404. With the steps above (save permalinks again, restore the standard block, reinstall the cache plugin properly), the site responds by lunchtime.
If you want us to walk you through it
A generalised 404 across inner pages gets solved better with someone technical looking alongside you. If you have already gone through the steps above and would rather not keep testing blindly, tell us what you have seen: what changed just before, whether you can access the panel, which web server you are on and which diagnosis steps you have completed. We will guide you on the next moves and, if you prefer us to handle it, we will explain the proposed work before touching anything on your site.
For a broader review of how the website works, see our performance page. Assessment and any subsequent implementation are agreed around what you need. To distinguish a missing-page response from a server failure, continue with the WordPress error 500 guide.