Fix 404 error in WordPress and repair permalinks

Reading time approx.: 17 minutes

A 404 error means that the requested resource was not found at the URL accessed. In WordPress, this can be completely normal—for example, if a page has actually been deleted. However, a 404 can also indicate a technical issue if existing posts, pages, or other content suddenly become unreachable.

Especially typical is the situation where the WordPress homepage continues to work, while subpages or blog posts suddenly show a 404 error. In that case, you should check the permalink and rewrite configuration in particular.

Briefly explained: If only a URL that no longer exists shows a 404 error, that can be correct. If, on the other hand, many existing WordPress pages or posts suddenly show a 404, even though the content is present in the admin area, you should check permalinks, rewrite rules, and if necessary .htaccess investigate.

What does HTTP 404 Not Found mean? #

When a browser calls a URL, the server responds with an HTTP status code.

The status:

404 Not Found

basically means that the server did not find the requested resource at this address.

That is not a statement about this, initially, why The resource is missing.

Possible reasons include, for example:

  • The URL was entered incorrectly
  • a page was deleted
  • a post was deleted
  • the slug was changed
  • The permalink structure has been changed.
  • WordPress rewrite rules are not working correctly
  • .htaccess missing or contains inappropriate rules
  • a plugin affects URLs or redirects
  • A migration changed the URL structure

A 404 error is not automatically a technical problem #

For example, if a visitor accesses the following non-existent address:

https://deine-domain.ch/diese-seite-gibt-es-nicht

is normally the exact right answer.

It only becomes problematic when a resource should actually be present or when important old URLs unintentionally stop working after a change.

Important: Do not try to prevent every 404 error fundamentally. A resource that truly does not exist is allowed to respond with a 404. What matters is whether the URL should exist and whether visitors or search engines can expect a meaningful replacement.

1. First check: One URL or many URLs affected? #

This test narrows down the cause considerably.

First, go to the homepage:

https://deine-domain.ch

Then test several well-known subpages and posts.

For example:

https://deine-domain.ch/ueber-uns
https://deine-domain.ch/beispielbeitrag

Afterwards, you can distinguish:

  • Only a single URL shows 404: Check URL, slug, deleted content, or redirect.
  • Almost all subpages show 404, home page works: Permalink or rewrite problem, most likely.
  • The home page is not working either: possibly not a typical permalink 404 issue.
  • Only certain content types are affected: Consider plugins, custom post types, or special rewrite rules.

2. Check if the content is still present in WordPress #

If a specific page or post shows a 404 error, first check in the WordPress admin area whether the content still exists at all.

For pages:

Pages → All Pages

For posts:

Posts → All Posts

Also check the status.

For example, content can:

  • published
  • Saved as draft
  • private
  • in the recycle bin

to be.

Content that is no longer publicly published is not necessarily accessible to normal visitors at its previous public URL.

3. Check URL and slug #

A common cause for a single 404 error is a changed URL.

For example, a page was originally at:

https://deine-domain.ch/webdesign-chur

reachable.

Will the slug be changed later to:

https://deine-domain.ch/webdesign

Doesn't the old address automatically continue to exist?.

Depending on WordPress behavior and the plugins used, certain old slugs may be partially redirected, but you should not rely on this blindly for important URLs.

4. Check permalink settings #

WordPress generates public URLs for posts and other content based on the permalink configuration.

Open:

Settings → Permalinks

There you can see the currently used permalink structure.

For example, a frequently used structure is based on the post title.

If the homepage works, but numerous existing subpages or posts suddenly show a 404 error, this settings page is a useful early diagnostic step.

5. Save permalinks again #

WordPress can update its rewrite rules when saving permalink settings.

To do this, go to:

Settings → Permalinks

and save the settings again.

You don't necessarily have to change the permalink structure for that.

Then test several previously affected URLs again.

Practical Tip: If the homepage works, but suddenly practically all normal subpages show a 404, re-saving the permalinks is one of the first useful tests.

6. Why does re-saving the permalinks help? #

WordPress uses rewrite rules to internally map user-friendly URLs to the correct WordPress request.

A URL like:

https://deine-domain.ch/mein-beitrag

does not simply necessarily correspond to a physical file named:

my post

on the server.

The webserver and WordPress must process the request correctly based on the rewrite and permalink rules.

If these rules are no longer valid or were not updated correctly, existing content can therefore seemingly „disappear,“ even though it is still present in the WordPress database.

7. What is URL rewriting? #

URL rewriting makes it possible to use understandable URLs and pass them internally to WordPress.

Instead of technical query parameters, this allows, for example, URLs such as:

https://deine-domain.ch/wordpress-hosting

be used.

WordPress then analyzes the request and determines the corresponding content.

If this mechanism does not work correctly, WordPress content can return a 404 status even though it exists in the admin area.

8. What role does .htaccess play? #

On Apache-based or compatible server configurations, WordPress can use the file:

.htaccess

use for rewrite rules.

It is usually located in the WordPress root directory.

However, the file may also contain other configurations in addition to WordPress rules, for example:

  • Redirects
  • Safety rules
  • Plugin rules
  • individual server instructions

That is why you should have an existing .htaccess do not simply delete or overwrite without checking.

9. Back up .htaccess before making changes #

If you .htaccess you have to examine manually, create a backup of the existing file beforehand.

For example, you can save a copy under a different file name.

This allows you to restore the previous state if a change causes further issues.

Attention: Do not just copy any .htaccessfile from a forum or an external website into your WordPress installation. The existing file may contain custom rules required for your website.

10. WordPress cannot update .htaccess #

If WordPress cannot write the required rewrite rules into the corresponding configuration file, this can be related to file permissions or the server configuration, for example.

WordPress can display notices on the permalink page in certain situations if rules need to be applied manually.

Do not change file permissions indiscriminately just so WordPress can write to a file.

The correct permissions depend on the respective server environment.

11. .htaccess is not the solution on every server #

The file .htaccess is not part of every possible web server architecture.

Other web servers or upstream systems may process rewrite rules differently.

Therefore, the blanket recommendation „Delete your .htaccess“ is not a universal WordPress solution.

The actual hosting environment must be taken into account.

12. Do not unnecessarily change the permalink structure #

If you only want to fix a technical 404 error, you should not introduce a new URL structure for the entire website at the same time.

Changing the permalink structure can alter numerous existing URLs.

This potentially affects:

  • search engine indexing
  • internal links
  • external backlinks
  • Bookmarks
  • Social media links
  • Newsletter links

Important: „Resave permalinks“ and „Change permalink structure“ are two different things. To repair the rewrite rules, simply resaving the existing configuration is often enough.

13. Error after changing the permalink structure #

If the 404 issues started immediately after a deliberate change to the permalink structure, you should investigate that exact change.

For example, a post URL can change from:

https://deine-domain.ch/2026/08/mein-beitrag

to:

https://deine-domain.ch/mein-beitrag

change.

From the perspective of browsers and search engines, this means different URLs exist.

For an existing website, it must therefore be checked how old URLs are handled.

14. When a 301 redirect is useful #

When existing content has been permanently moved to a new URL, a permanent redirect often makes sense.

The HTTP status:

301 Moved Permanently

signals that the resource is permanently available under a different address.

A classic example:

Old URL:

https://deine-domain.ch/wordpress-tipps-alt

New matching URL:

https://deine-domain.ch/wordpress-tipps

If both contents represent the same topic or the same resource, a redirection from old to new can make sense.

15. Do not redirect every 404 to the homepage #

A common misconfiguration is to indiscriminately redirect all not-found URLs to the homepage.

This is particularly helpful neither for visitors nor for search engines.

Who, for example:

https://deine-domain.ch/altes-wordpress-tutorial

calls, expects a corresponding content and not the start page without comment.

Attention: A redirect should have a relevant destination. If there is no meaningful replacement for a permanently removed resource, a proper 404 status can be better than an factually inappropriate redirect.

16. Deleted page: 404 or redirect? #

That depends on the specific case.

404 can be useful if:

  • the content has been permanently removed
  • no comparable substitute exists
  • the URL does not need any relevant visitors or links

A redirect can make sense if:

  • the content continues to exist under a new URL
  • two similar contents were merged
  • a clear and technically suitable replacement exists

The decision should be based on the actual content and not on the desire to avoid returning a 404 status at all costs.

17. What is HTTP 410 Gone? #

Besides 404, there is also the HTTP status:

410 Gone

He explicitly signals that a resource is no longer present and has been permanently removed.

However, for a normal WordPress website, it is not necessary to change every deliberately removed page to 410. A 404 is a regular and technically valid status for non-existent content.

18. Distinguish between 404 and Soft 404 #

A so-called Soft 404 is not a separate HTTP status code.

This is typically used to describe a situation in which a page looks like a non-existent or worthless error page in terms of content, but technically, for example, with:

200 OK

answers.

Search engines can classify such pages as soft 404s.

An example would be a non-existent product page that simply outputs „Product not found,“ but technically still returns a successful HTTP 200 status.

19. Why the correct HTTP status is important #

The visible content of an error page and the HTTP status are two different things.

A well-designed WordPress 404 page should technically still use:

404 Not Found

answer.

If they instead 200 OK returns, a client receives an incorrect technical signal.

This can be particularly problematic for search engines and automated systems.

20. Customize 404 page #

Even if a resource actually does not exist, the visitor should not necessarily be faced with a useless, blank error page.

A helpful 404 page can include, for example:

  • clear information that the page was not found
  • Link to homepage
  • Navigation
  • Search function
  • Links to important areas

The design depends on the theme, site editor, or page builder used.

However, the user-friendliness of the error page does not change the fact that the correct HTTP status should still be 404.

21. Error after plugin installation or plugin update #

Plugins can register their own rewrite rules, custom post types, taxonomies, or redirects.

If 404 issues occur immediately after installing, activating, or updating a plugin, this plugin should be considered as a potential cause.

First, save the permalink settings again.

If the problem persists and there is a temporal correlation with a plugin, a targeted conflict check may be useful.

We will discuss the procedure under Identifying and Resolving Plugin or Theme Conflicts in WordPress.

22. Error after changing theme #

A theme should generally not break standard WordPress permalinks. However, themes can bring their own custom post types, templates, or functions.

If certain URLs stop working immediately after switching themes, you should therefore check whether this content or URL structure depended on the previous theme.

This particularly affects themes with heavily integrated custom functions.

23. Custom Post Types and 404 Errors #

Plugins and themes can register custom content types.

Examples could be:

  • Portfolio
  • Events
  • References
  • Products
  • other individual content

If only such a content type generates 404 errors while normal posts and pages work, it is likely not a general WordPress permalink issue.

Then it should be checked which component registers this content type and which rewrite rules are used for it.

24. Correctly Classify WooCommerce-404 #

WooCommerce extends WordPress with its own content types and URL structures.

If exclusively products, product categories, or specific WooCommerce endpoints are affected, the WooCommerce configuration should be considered separately.

Resaving the WordPress permalinks can also be a useful diagnostic step there, but it does not replace checking for a faulty WooCommerce or plugin configuration.

25. 404 after website migration #

After a hosting or domain migration, 404 errors can occur if the previous URL or rewrite configuration does not fully match the new environment.

Check in particular:

  • Permalinks Settings
  • .htaccess or rewrite configuration
  • Domain changes
  • old internal links
  • individual redirects
  • Plugin-specific rewrite rules

If the domain has also changed at the same time, old and new URLs must additionally be mapped cleanly.

26. 404 after switching from HTTP to HTTPS #

Switching from HTTP to HTTPS should not change the actual WordPress paths.

If 404 errors still occur after that, it should be checked whether simultaneously:

  • Forwarding rules have been changed
  • .htaccess has been adjusted
  • Domain variants have been changed
  • Rewritten plugin URLs

HTTPS itself is not automatically the cause of a WordPress permalink error.

27. Consider www and non-www #

Even different domain variants can cause confusion in the case of faulty redirects.

For example:

https://deine-domain.ch/beitrag

and

https://www.deine-domain.ch/beitrag

When a variant is correctly redirected to the preferred variant, this is normally unproblematic.

However, faulty or conflicting rules can cause certain URLs not to arrive at their expected destination.

28. Check internal links after URL changes #

If you have changed a slug or a permalink structure, you should check internal links.

Even if a redirection has been set up, it makes sense to set internal links directly to the current target URL whenever possible.

This avoids unnecessary redirection steps and keeps the internal link structure clean.

29. External links to old URLs #

When other websites link to a URL that you change later, a proper permanent redirect can be especially important.

Without a redirect, visitors will land on a 404 page via the old external link.

For important existing URLs, it should therefore be checked before making a change whether external links and search engine traffic exist.

30. 404 errors in Google Search Console #

Search engines can continue to know and re-visit URLs that are no longer accessible for a certain period of time.

If a page has been deliberately removed and has no suitable replacement, a 404 is therefore not automatically a problem that strictly needs to be „repaired“.

It looks different when an important existing page unintentionally returns a 404.

Then the technical cause should be fixed or—in the event of a permanent URL change—a suitable redirect should be set up.

Important: A list of 404 URLs in an SEO tool does not automatically mean that every single URL should be redirected to some other page. First, it must be clarified why the URL was accessed and whether a meaningful substitute exists.

31. Incorrect URLs by bots and scanners #

Public websites regularly receive requests for URLs that have never existed.

Automated systems search for things like:

  • known plugin paths
  • Login addresses of other systems
  • old security vulnerabilities
  • randomly generated URLs

That such requests are answered with HTTP 404 is fundamentally normal.

Therefore, you don't have to fix every 404 URL that appears in a server log.

32. Typos in external links #

A 404 can also occur because another website linked your URL incorrectly.

If the broken link is relevant and can be clearly identified, a targeted redirect can make sense.

In contrast, a redirect is not strictly necessary for an unimportant or accidental incorrect URL.

33. 404 due to capitalization #

Depending on the server and file system configuration, capitalization can be technically relevant.

With normal WordPress permalinks, you should use consistent URLs and not generate internal links with randomly changing spellings.

Especially with direct file paths, the spelling can play a role.

Missing images and files are also 404 #

A 404 doesn't just affect WordPress pages and posts.

Even a missing image, for example, can respond with 404:

https://deine-domain.ch/wp-content/uploads/2026/08/bild.jpg

If a page itself works, but images are missing, you should therefore not automatically repair the WordPress permalinks.

Check instead:

  • does the file exist?
  • is the file path correct?
  • was the file moved or deleted?
  • Has a migration been fully completed?

35. JavaScript and CSS files with 404 #

Missing CSS or JavaScript files can also return HTTP 404.

This can cause the website to appear visually damaged or lose functionality, even though the actual HTML page remains accessible.

In this case, it is not a classic „WordPress subpages show 404“ error.

The affected resource and its path must be investigated.

36. 404 or 500? #

An HTTP 404 and an HTTP 500 describe different error classes.

404: The requested resource was not found.

500: The request could not be successfully processed due to an internal server error.

If your WordPress explicitly shows an HTTP 500 error, you can find the appropriate diagnosis under How to fix WordPress error 500.

37. 404 or website completely unreachable? #

If the browser cannot connect to the domain at all, it is not a normal WordPress 404.

Then, for example, domain, DNS, network, server, and SSL must be taken into account.

Use the broader instructions for that WordPress website not accessible: systematically check causes.

38. Consider cache after a repair #

If you have corrected permalinks or redirects, cache systems may temporarily continue to serve an old state.

Depending on the website, the following may be involved:

  • browser cache
  • WordPress Cache
  • Server cache
  • CDN or proxy

Therefore, after an actual repair, it can be useful to clear relevant caches.

Clearing the cache does not replace repairing incorrect rewrite rules.

39. Saving permalinks does not fix every 404 #

Resaving the permalinks is a useful test if existing WordPress content is no longer accessible due to incorrect rewrite rules.

It does not automatically help against this when:

  • a page was actually deleted
  • a URL is misspelled
  • a file is missing
  • a plugin generates an incorrect path
  • a domain is misconfigured
  • an external link contains a typo

Therefore, the cause should always match the error pattern.

40. Do not create redirect chains #

If URLs are changed multiple times, redirect chains can occur.

For example:

URL A → URL B → URL C

If possible, the old relevant URL should point directly to the final destination:

URL A → URL C

This reduces unnecessary additional requests and simplifies the technical structure.

41. Avoiding redirection loops #

Faulty rules can also create loops:

URL A → URL B → URL A → ...

The browser usually aborts such a process at some point with a message about too many redirects.

That is no longer a classic 404 error and should be treated as a redirect configuration issue.

42. When should you use a backup? #

A backup is not necessary just because a single non-existent URL correctly returns 404.

However, if immediately prior to the occurrence of numerous errors, extensive changes to:

  • Files
  • .htaccess
  • Plugins
  • Database
  • URL structure

have been made, a current backup is an important safeguard.

Before a full restore is performed, it should still be checked whether a targeted repair is possible.

43. Systematic order for WordPress 404 errors #

  1. Note the affected URL exactly.
  2. Check whether only one or multiple URLs are affected.
  3. Test home page and several subpages.
  4. Check if the content is present in the WordPress admin area and published.
  5. Check the current slug of the affected page.
  6. Under Settings → Permalinks check the existing configuration.
  7. Save existing permalink settings again.
  8. Retest affected URLs.
  9. With continued global problems rewrite configuration respectively .htaccess investigate.
  10. Consider recent plugin, theme, or server changes.
  11. Check individual removed URLs to see if a meaningful replacement exists.
  12. Set up a redirection only if there is a matching destination.
  13. Update internal links to changed URLs.
  14. Check relevant caches after the repair.
  15. Finally check the HTTP status of the affected URLs.

44. What you had better not do in the event of 404 errors #

  • do not blindly redirect every 404 to the homepage
  • Do not completely change the permalink structure just for testing
  • .htaccess do not overwrite without backup
  • Do not copy arbitrary rewrite rules from third-party websites
  • do not fix every bot 404 from the server log
  • do not redirect deleted URLs to thematically unrelated pages
  • Don't forget internal links after URL changes
  • Do not confuse 404 and 500 with each other
  • do not assume that clearing the cache will restore missing content
  • Do not treat every 404 error in an SEO tool as an acute website error

45. What information helps CURIAWEB support? #

If existing WordPress content suddenly displays 404 errors on CURIAWEB and you cannot determine the cause, concrete examples will help with the technical analysis.

Please share if possible:

  • affected domain
  • one or more specific 404 URLs
  • whether the home page works
  • whether all or only individual subpages are affected
  • whether the content in the WordPress admin area is still present
  • whether permalinks were recently changed
  • whether a plugin or theme has been updated
  • whether the website was recently migrated
  • Whether "ob" is an abbreviation for something specific or a typo in your source text, it translates to **whether** or **if** in English (from German, for example). If you intended a specific context, please provide the full sentence. .htaccess or forwarding rules have been changed

Do not send passwords unsolicited.

Summary #

An HTTP 404 status initially simply means that a resource was not found at the requested URL. That can be a technical problem—but it doesn't have to be.

If a single deliberately removed page does not have a suitable replacement, a 404 status can be completely correct. If, on the other hand, numerous existing WordPress posts and pages suddenly show 404 errors even though the homepage works, you should investigate permalinks and rewrite rules in particular.

In this case, an initial sensible step is often to save the existing settings again under Settings → Permalinks. On corresponding server environments, additionally the .htaccessbe relevant to the configuration.

For permanently changed URLs, a redirection should only be set up if a thematically relevant new destination exists. Blanket redirections of all 404 URLs to the homepage are not a clean solution.

Always distinguish, therefore, between a technical permalink issue, an actually removed resource, and a deliberately changed URL. Only then is it possible to decide whether to repair, redirect, or maintain a correct 404 status.

Last updated August 28, 2026
Was this article helpful?
Content
Cookie Consent with Real Cookie Banner