After I updated my wordpress I got a lot of 404 on my Google Analytics account eventhough pages are working just fine. Can anyone help me?
Here is my site:

It does not happen for all pages, only few. I don't want to lose organic traffic.

Have you had the same problem before?

Farris

Dani AI

Generated

Short answer: Google Analytics can show 404 hits even when pages “look” fine. Common causes are old incoming URLs (or changed permalinks), the 404 template or a plugin sending a virtual pageview/event, bot traffic hitting removed URLs, or a tracking snippet pointing at the wrong property. reported the problem after a WordPress update; ’s link-check is a good start but server-side responses and analytics configuration also need checking.

Quick checklist to diagnose (in order):

  • Reproduce a reported 404 URL and confirm the HTTP status with a HEAD request or the browser Network tab. For example:
curl -I https://example.com/suspected-404

A true 404 will show HTTP/1.1 404. If the page returns 200 but displays “not found” text, the site is mis-reporting status codes.

  • Inspect server access/error logs for matching 404 entries (timestamp + path). Logs prove whether GA is reporting real server-side 404s or client-side artifacts.
  • Look inside the theme’s 404 template and active plugins for any analytics code or JavaScript that fires a pageview/event when a missing URL is requested. Also search for virtual pageview calls (analytics push/ga()/gtag()/dataLayer.push) tied to error handling.
  • Flush WordPress permalinks (Settings → Permalinks) to rebuild rewrite rules, and temporarily disable redirection/caching/SEO plugins to isolate the change.

Analytics-specific checks and quick fixes:

  • Verify the tracking ID on the site matches the Analytics property being inspected (UA- or G- ID).
  • Confirm hits’ hostname matches the site; if not, filter or exclude non-hostname traffic (use a test view first — filters are destructive).
  • If URLs truly changed, put in 301 redirects (example .htaccess rule):
Redirect 301 /old-slug /new-slug

Also update the sitemap and use Search Console to re-crawl. If bots are the source, enable bot filtering and consider stricter server rules.

Cautions: always back up .htaccess and create a test Analytics view before adding filters. These checks will separate real 404s from analytics artefacts and point to either a server rewrite/permalink issue, a theme/plugin sending virtual hits, or external traffic.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.